cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
agshah
Level 7

How to create a file with Data and Time information

Hi all,
I have and InstallShield 2016 InstallScript MSI project.
I want to create a file that has timestamp info. For example, myfile_20180212181802.log.

How can I achieve this from the InstallScript.

I see there is Data and Time property so I used MsiGetProperty to get Date.
But Date is in the format for example, 2/12/2018 and windows file names cannot contain slashes.

Please advise how to create a filename with timestamp info. Basically I need to set a string
that will contain time such as 20180212181802.
Labels (1)
0 Kudos
(1) Reply
dan_galender
Level 10

You'll need to parse the Date and Time strings returned into their constituent parts (year, month, day, hour, minute) and then concatenate them back into the desired order.
0 Kudos