PDA

View Full Version : put current date/time in generated file


david_douglass
09-28-2004, 04:13 PM
Once my projects build, I'd like to create ReadMe.txt files to be bundled into the installers. I created Files / Write File steps to create the files. What would I place in the "Text to write to the file:" box to include the current date/time in a user friendly format, e. g., Tuesday, September 28, 2004 5:12 PM (or something like that)?

Thanks,
Dave

kevina
09-28-2004, 10:13 PM
Here is a simple script function that does what you are looking for. The project level FormattedDate script function does the work, the Log Message step demonstrates it's usage.

Unfortunately vb script doesn't provide a good format function but this isn't complex and does the job (and should be straight forward to modify for similar needs).