Highlighted
markquah Absent Member.
Absent Member.
142 views

I want to format date/time variable in modscript

I am using the following function to retrieve current date:

var dtmToday = Date();

However, I am not able to manipulate it into ISO format string. Where can I get help on the date/time function for ChaiScript?

Thanks in advance.

Cheers,
Mark
0 Likes
1 Reply
Micro Focus Contributor
Micro Focus Contributor

Re: I want to format date/time variable in modscript

Depending on the version of SBM you are on, ModScript has some great features for formatting dates. Take a look here, custom date formatting was added in 11.4. Combine this with TimeTNow(), a function for getting the current timestamp as a TimeT, and you can format a date in any format you like. The patterns for the format string are documented here.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.