Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

valiadtion of date in dd.mm.yyyy format

0 Kudos
133

i have a selection screen in which i want user to enter date in dd.mm.yyyy format only.how can i validate that.any FM.

i also want that date to be changed in yyyymmdd format coz i have to update that in a field which has yyyymmdd format.

so is there any fm for this also ( to change dd.mm.yyyy to yyyymmdd).

any pointers will help.

4 REPLIES 4

Former Member
0 Kudos
85

Hi,

If you specifiy the type of the parameter as of type SY-DATUM system will force user to enter the date in dd.mm.yyyy format only. It also stores that date in yyyymmdd format which you update in a field which has yyyymmdd format.

Regards,

Vaishali.

Former Member
0 Kudos
85

Hi Govind,

Based on the user defaults in the transaction SU01 the date will be verified based on the date format selected in the user details.

Declare the selection screen variable as of type Sy-DATUM.

what ever format you had entered the date in the selection screen the variable will hold the value in the format yyyymmdd.

no need to do any format for the date.

hope this might help you.

regards,

Phani.

former_member1245113
Active Contributor
0 Kudos
85

Hi

Take the Help of this FM CONVERT_DATE_FORMAT

or alternately whatever the format the user enters convert yourself in the format you require in AT SELECTION-SCREEN event.

Cheerz

Ram

Former Member
0 Kudos
85

Hi ,

Based on the user defaults in the transaction SU01 the date will be verified based on the date

format selected in the user details.

Now U split the date and concatenate the date , month year value to your desired format.

Thanks

Shambhu