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

How to find user's current date format ?

Former Member
0 Likes
4,054

Hi guys,

i need to display some variable as per the user's current date format.

But it is always following DD.MM.YYYY whereas my user format is MM/DD/YYYY.

i know how to see it in system -- > user profile --> own data....

But i need to write code to find the current date format ...

HELP ME

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,315

How can i write date in DD.MM.YYYY to a variable ???

11 REPLIES 11
Read only

Former Member
0 Likes
3,315

hi,

date format is stored in USR01 table.

regards,

ananth

Read only

Former Member
0 Likes
3,315

Hi,

Try this:

data: l_date_string(10).

write l_date to l_date_string.

write l_date_string.

Read only

Former Member
0 Likes
3,315

Hi!

It is stored in USR01 table DATFM field (its a number, which means a specific format).

Regards

Tamá

Read only

Former Member
0 Likes
3,315

you can write a select on USR01 table

select DATFM from USR01 into V_DATFM where bname eq sy-uname.

Read only

0 Likes
3,315

Any Function module to change the date to user's current date format ????

Read only

0 Likes
3,315

try with this

CONVERT_DATE_TO_EXTERNAL

Read only

Former Member
0 Likes
3,316

How can i write date in DD.MM.YYYY to a variable ???

Read only

0 Likes
3,315

data: v_date(10).

write sy-datum to v_date using edit mask '__.__.____'.

Read only

0 Likes
3,315

What is edit mask? is it the option of write statement ?//

Read only

0 Likes
3,315

No one suggested to use edit mask ...it is not present in write statement help also

Thanks alot Ravi...

Read only

0 Likes
3,315

Hi GUru,

It is there in write statement help. Under formatting options i guess.

Regards,

Ravi