Application Development and Automation 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: 
Read only

Field with date format

venkatasap
Participant
0 Likes
567

Hi SapAll.

i had created one function module with field tare date of DATS format.

when iam testing this by putting the tare date as 12.02.2010 ,it is accepting the same value as 20100212.

but i want the field to be accpeted same as the input value i.e 12.02.2010.

can any body help me in this.

regards.

Varma

Hi SapAll.

i had created one function module with field tare date of DATS format.

when iam testing this by putting the tare date as 12.02.2010 ,it is accepting the same value as 20100212.

but i want the field to be accpeted same as the input value i.e 12.02.2010.

can any body help me in this.

regards.

Varma

3 REPLIES 3
Read only

rainer_hbenthal
Active Contributor
0 Likes
535

What are you doing if a user chooses date format 2 in his settings? Relying on a special date format is bad. A function module should be generic, so the format D or DATS is ok as type.

Read only

Former Member
0 Likes
535

20100212 in YYYYMMDD is sap internal format when you declare the data type as d . generally this wil be used for calculation and validations no harm done :).

you can use convdateinternal and convdateexternal Fm's to modify the date in ur user settings .

'12.02.2010' if u want to validate this date in this format then it should be handled with character format in ur datatype.

Br,

Vijay

Read only

ThomasZloch
Active Contributor
0 Likes
535

Date formatting questions not allowed (all FAQ and answered before), see forum rules, thread locked.

Thomas