‎2006 Sep 05 11:32 AM
Hi all ,
I got a date field eg 12.06.2006 Whn i give this in parameters i am getting the reverse of the date eg 20060612.Is there any f module to reverse the process.I want the result as 12062006.
‎2006 Sep 05 11:37 AM
Use one of the FMS
CONVERT_DATE_INTERNAL
CONVERT_DATE_EXTERNAL
Rewards points if found useful
Saurabh
‎2006 Sep 05 11:37 AM
Hi
Its not reverse. Its the default format for date YYYYMMDD.
Use a Character varaible to get the date in the DDMMYYYY using <b>offset</b> functionality.
Regards,
Raj
‎2006 Sep 05 11:37 AM
Use one of the FMS
CONVERT_DATE_INTERNAL
CONVERT_DATE_EXTERNAL
Rewards points if found useful
Saurabh
‎2006 Sep 05 11:42 AM
Hi,
Try FM "CONVERT_DATE_TO_INTERN_FORMAT" and also it depends on the user settings.
Other way around is pass it as a string STRING_REVERSE FM.
Reward if helpful.
Rgds
‎2006 Sep 05 11:43 AM
‎2006 Sep 05 11:45 AM
Hi Alex,
u can change it using the code as give in the the link..,
http://www.sap-img.com/abap/abap-program-output-of-date-format.htm
Hope it helps..,
Regards,
Raja
‎2006 Sep 05 11:46 AM
Hi,
You can use WRITE: SY-DATUM TO W_VARIABLE DD/MM/YYYY. The '/' will be decided form user profile(whether it is dot. or slash /).
Thanks and Regards,
Bharat Kumar Reddy.V
‎2006 Sep 05 11:56 AM
Alex,
If you have defined the parameter like sy-datum(basically and date field) ...the value in the parameter would be validated for date and stored in YYYYMMDD. In that case you can use the write statement to store it in different format in char field.
WRITE pdate to cdate DD/MM/YYYY.
Otherwise you can change your parameter to be of character type and it would take the value as you have entered but make sure that you would need to validate the date.
Regards
Anurag