DateTimeToUserFormat
Mon 01 January 2018Syntax
DateTimeToUserFormat(textdatetime, {timezone | "Local" | "Base"})
Description
Use the DateTimeToUserFormat function to convert the string value textdatetime in PeopleSoft internal date/time format to a date/time value in the user's personalized date/time format for a specified time zone.
The format for the return value is determined in the following order of precedence:
-
User personalizations if they exist.
-
If there are no user personalizations, then any format specified by the browser language setting in PSLOCALEDEFN.
-
If there are no user personalizations and there is no browser session to determine the browser language settings (for example, when running an Application Engine program directly in Application Designer), the systemâs regional language setting is used to determine the format.
For example, if the
user's date and time format personalization settings are DDMMYY and
24-hour clock, the following function invocation returns a DateTime
string equal to
27/09/2011 08:00:00
.
&DTM = DateTimeToUserFormat("2011-09-27 08:00:00.000000", "Base");
Parameters
Field or Control |
Definition |
---|---|
textdatetime |
Specifies a String value representing a date/time value in the PeopleSoft internal format: YYYY - MM - DD hh : mm : ss . SSSSSS (for example, 1999-01-01 19:20:30.000000) In which:
|
timezone | "Local" | "Base" |
Specifies a String value to indicating the time zone to convert to. The values are:
|
Returns
Returns a DateTime value in user format for the specified time zone.