Code below
The procedure is in a proc library, and has run fine for 15 years or more. It gets a filedate and time from an ADIR array from which it creates timestamps of various sorts.
The opperant code is
m.timestamp = DTOC(downloaded(1,3)) + downloaded(1,4)
Running the exe directly, or doing the install on my own machine there is no problem.
But I get a file not found error when it runs in the executable installed on another machine
I realize I can probably get the job done using fdate and ftime, but am worried that something will go wrong with another array sometime. Its is not a constant issue. I created a test array reference earlier in the program, and that ran ok. But I am wondering. In another case, I might not have a good way around using the array.
The installer was created with inno setup
PROCEDURE datatime
&& Provides a timestamp tag for export filenames
&& to indicate the time the data was obtained.
PARAMETERS filespec
filespec = IIF(EMPTY(filespec),ALIAS() + ".dbf",filespec)
curdateset = SET("Date")
curcenturyset = SET("Century")
dnlddata = ADIR(downloaded,filespec)
SET DATE YMD
SET CENTURY on
m.timestamp = DTOC(downloaded(1,3)) + downloaded(1,4)
SET DATE (curdateset)
SET CENTURY &curcenturyset
m.timenote = DTOC(downloaded(1,3)) + " at " + downloaded(1,4)
m.datatime = CTOT(DTOC(downloaded(1,3)) + " " + downloaded(1,4) )
m.timestamp = STRTRAN(m.timestamp,":","")
m.timestamp = STRTRAN(m.timestamp,"-","")
m.timestamp = STRTRAN(m.timestamp,"/","")
m.timestamp = STRTRAN(m.timestamp,".","")
m.timestamp = STRTRAN(m.timestamp," ","")
IF file("datadate.dbf")
SELECT 0
USE datadate
ELSE
CREATE TABLE datadate (timestamp c(12),datadate c(30),datatime t)
ENDIF
REPLACE timestamp WITH m.timestamp
REPLACE datadate WITH m.timenote
replace datatime WITH m.datatime
USE IN datadate
RETURN
The procedure is in a proc library, and has run fine for 15 years or more. It gets a filedate and time from an ADIR array from which it creates timestamps of various sorts.
The opperant code is
m.timestamp = DTOC(downloaded(1,3)) + downloaded(1,4)
Running the exe directly, or doing the install on my own machine there is no problem.
But I get a file not found error when it runs in the executable installed on another machine
I realize I can probably get the job done using fdate and ftime, but am worried that something will go wrong with another array sometime. Its is not a constant issue. I created a test array reference earlier in the program, and that ran ok. But I am wondering. In another case, I might not have a good way around using the array.
The installer was created with inno setup
PROCEDURE datatime
&& Provides a timestamp tag for export filenames
&& to indicate the time the data was obtained.
PARAMETERS filespec
filespec = IIF(EMPTY(filespec),ALIAS() + ".dbf",filespec)
curdateset = SET("Date")
curcenturyset = SET("Century")
dnlddata = ADIR(downloaded,filespec)
SET DATE YMD
SET CENTURY on
m.timestamp = DTOC(downloaded(1,3)) + downloaded(1,4)
SET DATE (curdateset)
SET CENTURY &curcenturyset
m.timenote = DTOC(downloaded(1,3)) + " at " + downloaded(1,4)
m.datatime = CTOT(DTOC(downloaded(1,3)) + " " + downloaded(1,4) )
m.timestamp = STRTRAN(m.timestamp,":","")
m.timestamp = STRTRAN(m.timestamp,"-","")
m.timestamp = STRTRAN(m.timestamp,"/","")
m.timestamp = STRTRAN(m.timestamp,".","")
m.timestamp = STRTRAN(m.timestamp," ","")
IF file("datadate.dbf")
SELECT 0
USE datadate
ELSE
CREATE TABLE datadate (timestamp c(12),datadate c(30),datatime t)
ENDIF
REPLACE timestamp WITH m.timestamp
REPLACE datadate WITH m.timenote
replace datatime WITH m.datatime
USE IN datadate
RETURN