ConvertDatetimeToBase

Mon 01 January 2018

Syntax

ConvertDatetimeToBase(textdatetime, {timezone | "Local" | "Base"})

Description

Use the ConvertDatetimeToBase function to convert the text value textdatetime to a DateTime value. The ConvertDatetimeToBase function then further converts it from the specified time zone to the base time zone. This function automatically calculates whether daylight saving time is in effect for the given textdatetime and time zone.

The system’s base time zone is specified in the PSOPTIONS table.

Parameters

Field or Control

Definition

textdatetime

Specify a date/time represented as text in the PeopleSoft internal format: yyyy - mm - dd hh : mm : ss [ . S ] (for example, "2011-01-01 18:10:52.000000").

In which:

  • yyyy is a four-digit year.

  • mm is a two-digit month (01 through 12).

  • dd is a two-digit day of the month (01 through 31).

  • hh is a two digits of hour (00 through 23).

  • mm is a two digits of minute (00 through 59).

  • ss is two digits of second (00 through 59).

  • S is milliseconds in one or up to six digits.

timezone | Local | Base

Specify a value for converting textdatetime . Values are:

  • timezone - a time zone abbreviation or a field reference to be used for converting textdatetime

  • Local - use the local time zone for converting textdatetime.

  • Base - use the base time zone for converting textdatetime .

Returns

Returns a DateTime value in the base time zone.