Reputation: 31
In Progress 4gl,how to use DateTime Stamp as a Filename , such that each time I run a program it should create a new output csv file? Im using Progress version 11.5..For eg., outfilename = "c:\progress\?.csv". Instead of '?' , what should I replace to get a DateTime Stamp as a filename.
Upvotes: 1
Views: 1217
Reputation: 380
This is one way of doing it:
OUTPUT TO VALUE("c:\progress\filename_" + STRING(TODAY,"99999999") + STRING(TIME) + ".csv").
Upvotes: 1
Reputation: 3251
This is one way to do what you're looking for:
OUTPUT TO VALUE(REPLACE(REPLACE(ISO-DATE(now), ":", "-"), ".", "-") + ".csv"):
/* output data */
OUTPUT CLOSE.
Upvotes: 1