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: 

Date And Time Formate

Former Member
0 Kudos

Hi friends,

I want to change this formate date and time 18.01.2008 16:40:31 to 01/18/2008 04:40:31PM

Could you please any one Suggest any FM for this?

Thanks & regards

HB

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Change your date and time format before passing to FM..

Using EDIT MASK 'YYYY/MM/DD' and 'HH:MM:SS'

And then call FM..

"CY_CONVERT_DATE" . It will convert the date into current user format.

Regards

4 REPLIES 4

Former Member
0 Kudos

Hi,

Change your date and time format before passing to FM..

Using EDIT MASK 'YYYY/MM/DD' and 'HH:MM:SS'

And then call FM..

"CY_CONVERT_DATE" . It will convert the date into current user format.

Regards

0 Kudos

thanks for ur reply..

Could you please tel me how to edit mask?......

Please provide the steps....

Former Member
0 Kudos

Hi Hans,

Follow the below logic ok..

data: lv_dat TYPE d, "For Date

lv_date(10). "For Date

*For Date

SET COUNTRY 'US'.

lv_dat = '18.01.2008'

WRITE lv_dat TO lv_date MM/DD/YYYY.

Reward points if helpful.

Kiran Kumar.G.A

Former Member
0 Kudos

Hi,

U can use edit mask for ur requiremnet as

DATA date TYPE d VALUE '18.01.2008 '.

WRITE (8) date USING EDIT MASK '_/_/_'

Regards