Getting current time in HHMMSS Format


Here's how to get the current time in the format HHMMSS from the current time:

Local &strCurrentTime;
&strCurrentTime = Substring(Substitute(String(TimePart(%Datetime)), ".", ""), 1, 6);

This takes the time part of the current date time on the application server, replaces the dot (.) seperators with blanks, and returns only the first 6 characters (hhmmss) ignoring the millisecond part. This returns say a time of 11.52.00.000000 as 115200.


Revision #1
Created Thu, Aug 1, 2019 2:20 PM by PeopleSoft Wiki
Updated Thu, Aug 1, 2019 2:32 PM by PeopleSoft Wiki