2007 Jun 05 7:53 AM
i have a date in the format of 20070530
now i want the date to be int the format of 30/05/2007.
how can i do that.
thanks in advance
2007 Jun 05 7:56 AM
HI,
data: Date type Sy-datum,
date1(10) type c.
Date = sy-datum.
Write Date to Date1.
write:/ date1. " This will have the format which you asked
Regards
Sudheer
2007 Jun 05 7:56 AM
Hi
Use the Split and Concatenate mechanism.
g_date = sy-datum.
concatenate g_date0(4) '/' g_date4(2) '/' g_date+6(2) into g_date.
Regards,
Sree
2007 Jun 05 7:56 AM
Use
WRITE date MM/DD/YYYY.
or use FM CONVERT_DATE_TO_EXTERNAL
Regards,
Atish
2007 Jun 05 7:56 AM
HI,
data: Date type Sy-datum,
date1(10) type c.
Date = sy-datum.
Write Date to Date1.
write:/ date1. " This will have the format which you asked
Regards
Sudheer
2007 Jun 05 7:57 AM
Hi
Do the offset for the date field by splitting into YEAR(first 4 char), Month(next 2 char) and DATE (last 2 char) and concatenate them into a string as per your requirement
or Use EDIT mask command for wrirting this format
Reward points if useful
Regards
Anji
2007 Jun 05 7:57 AM
Hi,
you can use offsets to change format what you want.
or use statemetn like "write: date1 to date2" converts date as per user settings.
Sudheer.A
2007 Jun 05 7:57 AM
hi,
In the menu bar Goto->System->User Profile->Owndata->Defaults.
There u have the options and u can select the date format which u want.
Message was edited by:
Roja Velagapudi
2007 Jun 05 7:57 AM
write : itab-date using edit mask '__/__/____'.
or
data : date(10).
concatenate sy-datum6(2) sy-datum4(2) sy-datum+0(4) into date separated by '/'.
write : date.
regards
shiba dutta
2007 Jun 05 7:57 AM
Try FM - DATE_STRING_CONVERT
Regards,
Amit
Reward all helpful replies.
2007 Jun 05 8:00 AM
Hi
Do Like This........
Data:Date Type sy-datum,date1(2),month(2),year(4),final_date(10).
date1 = date+6(2).
month = date+4(2).
year = date+0(4).
concatenate date month year into final_date seperated by '/'.
Reward All Helpfull Answers..........