Skip to Content

Ado form: Custom date format based on /1BCDWB/DOCPARAMS-land1

Hello Gurus

I need to have the dates format based on the country pass has parameter.

The current dates format available in the display pattern have only 2 digits for the year.

What I need is to display the date format based on the country set in /1BCDWB/DOCPARAMS-land1

Example:

Land1 Date format (display only)

US "MM/DD/YYYY"

CA "DD/MM/YYYY"

Is it possible to do it without having to perform coding in XML?

The field is in display only and will not be fillable.

All suggestions will be highly appreciated.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Aug 29, 2017 at 01:46 PM

    Problem solved.

    At the initialization event of the field add the following Formcalc code.

    if ( $record.yourlandfield eq "CA" ) then

    $.rawValue = Format( "DD/MM/YYYY", $.rawValue )

    else

    $.rawValue = Format( "MM/DD/YYYY", $.rawValue )

    endif

    Add comment
    10|10000 characters needed characters exceeded