Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Application Server

WWStringFromTime()

  • Last UpdatedSep 14, 2023
  • 1 minute read

Converts a time value given in local time into UTC time (Coordinated Universal Time), and displays the result as a string.

Category

String

Syntax

MessageResult = wwStringFromTime(SecsSince1-1-70,StringType);

Parameters

SecsSince1-1-70

Integer Type. Number of Seconds elapsed since Jan 01 00:00:00 1970.

StringType

Determines the display method:

1 = Displays the date in the same format set from the windows control Panel. (Similar to that displayed for $DateString.)

2 = Displays the time in the same format set from the Windows control Panel. (Similar to that displayed for $TimeString.)

3 = Displays a 24-character string indicating both the date and time: "Wed Jan 02 02:03:55 1993"

4 = Displays the short form for the day of the week: "Wed"

5 = Displays the long form for the day of the week: "Wednesday"

Remarks

Any adjustments necessary due to Daylight Savings Time will automatically be applied to the return result. Therefore, it is not necessary to make any manual adjustments for DST to the input value.

Example

This example assumes that the time zone on the local node is Pacific Standard Time (UTC-0800). The local time passed to the function is 04:00:00 PM on Thursday, 1/1/1970. Since PST is 8 hours behind UTC, the function will return the following results:

wwStringFromTime(57600, 1) will return "1/2/70"

wwStringFromTime(57600, 2) will return "12:00:00 AM"

wwStringFromTime(57600, 3) will return "Fri Jan 02 00:00:00 1970"

wwStringFromTime(57600, 4) will return "Fri"

wwStringFromTime(57600, 5) will return "Friday"

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in