This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- How to create a file with Data and Time information
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Feb 12, 2018
07:34 PM
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.
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.
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Feb 12, 2018
07:40 PM
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.