‎2008 Jul 04 8:40 AM
Hi folks,
Pls tell me the function module which converts date format from 20080704 to 04.07.2008. I have done it by offet operations. But i want to do it by FM. pls help me..
Thanks.
Shyam.
‎2008 Jul 04 8:42 AM
Hi
Use this FM CONVERT_DATE_TO_INTERN_FORMAT
Reward if helpful.
Regards
Chandralekha.
‎2008 Jul 04 8:43 AM
Hi,
Use the function module
'CONVERT_DATE_TO_INTERN_FORMAT'
Hope it is usefull...
Jaya Vani
‎2008 Jul 04 8:44 AM
Hi,
If you are looking for printing the date based on user format
WRITE sy-datum TO date_short would help,
or else you can try
WRITE sy-datum TO date_long,
date_mask DD/MM/YY.
‎2008 Jul 04 8:45 AM
Check out FM's
CONVERT_DATE_TO_INTERNAL or CONVERT_DATE_TO_EXTERNAL.
Regards,
Santosh
‎2008 Jul 04 8:45 AM
Hi
U don't need any fm but only WRITE statament:
WRITE <DATE IN> TO <DATE OUT> .
Max
‎2008 Jul 04 8:46 AM
Hi
you can also ues this CONVERT_DATE_INPUT
Reward if helpful.
Regards
Chandralekha.
‎2008 Jul 04 8:55 AM
hi jusu try this,
data: dt(8) type c,
dt = sy-datum
dt will contain 04.07.2008
‎2008 Jul 04 9:30 AM
Hi Syam,
I assume ur date is like this 2008-year, 07-month 04-date.
If u always want ur date in DD.MM.YYYY then use concatenate statement.
DATA: w_date TYPE sy-datum VALUE '20080704',
w_date1(10) TYPE c.
CONCATENATE w_date6(2) w_date4(2) w_date+0(4) INTO w_date1 SEPARATED BY '.'.
If u want the date as per user settings then even no need of FM. U can simply use WRITE TO statement.
WRITE w_date TO w_date1.
This will write the date as per user settings.
eg: If user setting is MM-DD-YYYY.
Then above statement will write 07-04-2008 to w_date1.
Check SU3 transaction=>Defaults tab for user settings. U can try above thing by changing ur settings.
Note: Settings will be effective from next log on onwards.
Thanks,
Vinod.
‎2008 Jul 04 1:11 PM
Hi,
Try the FM "CONVERT_DATE_TO_EXTERNAL" and check.
Hope it helps you.
Murthy.