cancel
Showing results for 
Search instead for 
Did you mean: 

Date Format

IanStubbings
Active Participant
0 Kudos

Hi

I wish to have an date type input box with a date format of DD/MM/YYYY. It appears however that standard SAP does not have this format. The closest is DD.MM.YYYY. Is there a way I can change this without having a text field that I have to write the values in from another field.

Cheers

Ian

Accepted Solutions (1)

Accepted Solutions (1)

SergioFerrari
Active Contributor
0 Kudos

You can set the date format for each user. Logon via SAPgui and run SU01. In the User Defaults you'll find the date format (and other interesting settings).

Sergio

IanStubbings
Active Participant
0 Kudos

Hi Sergio

Apologies, I should have mentioned that it was in SU01 where I saw the other date formats. We have 1-9 then A,B,C. None of these have the date format I require though. It must be DD/MM/YYYY.

Cheers

Ian

SergioFerrari
Active Contributor
0 Kudos

I see no standard solution.

I would define a new domain ZZDATUM coding a Conversion Exit that manages data entry and rappresentation format. Set Data Type DATS (in order to attach the std CALENDAR Search Help) and in the field COnvers. exit you can try DTINV (CONVERSION_EXIT_DTINV_INPUT To date in SPEC 2000 format).

Then you can copy CONVERSION_EXIT_DTINV_INPUT (and _OUTPUT) and code what you need...

Sergio

IanStubbings
Active Participant
0 Kudos

That sounds like a good plan. Can you create Z conversion exits then?

SergioFerrari
Active Contributor
0 Kudos

Yes for sure, copy CONVERSION_EXIT_DTINV_INPUT to CONVERSION_EXIT_ZZIAN_INPUT (and the same for the OUTPUT one) and enjoy yourself.

I think it will work BUT you need use the new DOMAIN in so much data elements that it will not be very nice. What happens when you need to use an SAP standard structure?

Anyway I see no other good solution for you, if not accepting the provided date formats.

Bye

IanStubbings
Active Participant
0 Kudos

Thanks for your help, Sergio. I'm nearly there. The only issue is when selecting the date from the date picker and it automatically populates the date with the dots!

Is there any way of creating another format in the standard drop down?

Ian

SergioFerrari
Active Contributor
0 Kudos

It's a pity, the javascript reflects what is set in SU01 and I cannot see any way to influence it.

Other ideas are welcome...

Sergio

Answers (0)