‎2008 Nov 10 10:52 AM
Hi all,
1)SAP date is 09/08/2008 . Remove slashes , only keep 2 digit year , then numerical day of the year ,1-365. out put value is 08252.?
2) 09/08/2008 to 090808 ?
3) And SAP time is 23:16:59 .Remove colons and add 2 zeros at the beginning out put value is 00231659.?
Regards
Venkat
‎2008 Nov 10 11:48 AM
Hi Venkat,
To change the format for date and time as per your requirements in (2) and (3).
You can use this code :-
PARAMETERS : DATE LIKE SY-DATUM.
WRITE 😕 'Date', DATE DDMMYY,
/ 'Time', SY-UZEIT USING EDIT MASK '00______'.
Thanks & Regards.
Tarun.
‎2008 Nov 10 11:04 AM
check the demo program
DEMO_DATA_DATE_TIME
hope this will help you
‎2008 Nov 10 11:48 AM
hi srinu,
Can you send me the code for the above queries .
Regards
Venkat
‎2008 Nov 10 11:11 AM
CONVERT_DATE_TO_EXTERNAL u2013 Formats date from internal to display format . . . . . . . .
CONVERT_DATE_TO_INTERNAL u2013 Formats date from display to internal format . . . . . . . . .
after conversion apply string manipulation operations to gets ur desired result
‎2008 Nov 10 11:48 AM
Hi Venkat,
To change the format for date and time as per your requirements in (2) and (3).
You can use this code :-
PARAMETERS : DATE LIKE SY-DATUM.
WRITE 😕 'Date', DATE DDMMYY,
/ 'Time', SY-UZEIT USING EDIT MASK '00______'.
Thanks & Regards.
Tarun.
‎2008 Nov 14 2:59 PM