Archive: Getting "today's" date dynamically


Getting "today's" date dynamically
I currently define a variable in my script that is the date of the software build. Right now I have to manually change this line every time I do a release build. This line looks like this:

!define SOFTWARE_VERSION "April 22nd, 2008"

Is there some way in NSIS to get the current date (formatted preferably) dynamically? It would be much better if I didn't have to change this line ever again :)

Thanks,

Kennedy


You could use ${__DATE__} in the script


That works well. Thank you for your help.


You can also define date with your own format...

!define /date MYDATE "%b %dnd, %Y"
${MYDATE} = "April 30nd, 2008"

See strftime at MSDN for all symbols.
http://msdn.microsoft.com/en-us/libr...ak(VS.71).aspx


ahh.. thank you! I understand now about installer time vs run time... tho it wasn't quite clear from the F1 help file