cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Date field

Former Member
0 Kudos

Hi All,

I have one form, that date fields are defined Locale.

it shows for Japan country 2010/10/14 and for German likes Oct 14, 2010.

I want see for German like 14.10.2010 instead of Oct 14, 2010.

I can't define in pattern like DD.MM.YYYY, because Japan and US, GB has different date format, and the form is for all countries.

Any help how to do it?

Thanks in advance.

Best regards,

Ana

Accepted Solutions (0)

Answers (2)

Answers (2)

OttoGold
Active Contributor
0 Kudos

As mentioned above you could try the scripting approach or (maybe a little weird one) create multiple fields with single source (multiple date fields displaying the same) - but the trick is to set the locale for every field (US, Germany etc.).

Well, if you don´t have an interactive form and want only print this, I would build this logic in the backend in ABAP instead of trying a suicide in the form. If you could do it this way, use a string node to pass the value into the form and do what you need to do in the backend.

Regards Otto

Former Member
0 Kudos

Hi,

My suggestion is ,

if you have country information,then you can use the simple FormCalc code to achieve this.

Example:

Country Information is available in the Field COUNTRY in the interface.

Drag it into the Context.

In the Layout,select the date field and goto Script Editor.

Select the Inititialize event ,Language Form Calc and Run at Client.

Place the following code.

 
if ( $record.COUNTRY == "DE" )then 
$.format.picture = DateFmt(2, "de_DE"); 
endif 

in place of $record.COUNTRY ; you can use your form field contains the country information.

Thanks.

UmaS.