rbf_getDateInISOFromUserFormat

Warning: Support for using this method with external objects (such as those mapped to external tables, to OpenEdge Service objects, or through a HDP connection) is a beta feature. This method is supported in production systems, except for external objects.

Purpose

This function converts the input Date or Date/Time value from User format to ISO format.

Syntax

rbf_getDateInISOFromUserFormat(inputDate, format, keepOffSet)

Parameters

inputDate

The Date or Date/Time value to be returned.

format

The format of the date to be returned. To convert input value into Date format, enter Date and to convert input value into Date/Time format, enter DateTime in the format parmeter.

keepOffSet

This parameter is applicable only if the input value is a Date/Time value. If keepOffSetis set to true, UTC conversions are prevented while maintaining the timezone offset. By default keepOffSet is set to false.

Example

For the given input Date value

rbf_getDateInISOFromUserFormat("Jun 15, 2018","Date"); // Date Format

The output result is

2018-06-15

For the given input Date/Time value and the keepOffSet parameter set to true or false:

rbf_getDateInISOFromUserFormat("Jun 15, 2018","DateTime",true); // DateTime Format

The output result is

2018-06-15T00:00:00.000+05:30

rbf_getDateInISOFromUserFormat("Jun 15, 2018","DateTime",false);//DateTime format

The output result is

2018-06-14T18:30:00.000Z // UTC