Skip to Content
0
Former Member
Apr 27, 2009 at 11:27 AM

Date entered as DD/MM/YYYY converts to MM.DD.YYYY

812 Views

Hi all.

I'm creating a Webdynpro Abap application. In this application, there is a date input field. All our users have the date format set to DD.MM.YYYY, so when the date is displayed, it's in this format.

However, when a user enters a date using "/" instead of "." , the system takes it as if the user was using MM/DD/YYYY format, and converts the values that way.

Example:

User enters 01.02.09 -> This is stored as 20090201

User enters 01/02/09 -> This is stored as 20090102

User enters 15/02/09 -> User gets error "invalid date" (since 15 is processed as month)

You can see that day and month changes places if you use "/".

I have asked SAP and they said this is normal, since the only valid formats are DD.MM.YYYY and MM/DD/YYYY.

So, does anybody know a way to prevent this conversion? A user-exit or BADI could be useful..

Thanks.