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

AVEVA™ Work Tasks

SFU​.getDateTimeInServerUTCFormat()

  • Last UpdatedJun 25, 2024
  • 1 minute read

Use getDateTimeInServerUTCFormat() method to get the date and time in Server or Local culture.

Syntax

sRetVal = SFU.getDateTimeInServerUTCFormat(dateTime, forUIValue);

Parameters

Parameter

Description

dateTime

Date and Time object.

Note: The time zone from the JavaScript Date object is not considered.

forUIValue

A Boolean flag which determines whether the dateTime parameter value has to be converted to a local/display value based on the server UTC offset.

This parameter is optional.

The default value is false.

Return Value

This method returns a date and time object.

Example

// Get the date and time in Server culture.

var dateTime = new Date();

var dateTimeUtc = SFU.getDateTimeInServerUTCFormat(dateTime);

// Get the date and time in Local culture.

var dateTimeUtc = new Date(); // UTC Date value

var dateTime = SFU.getDateTimeInServerUTCFormat(dateTimeUtc, true);

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