‎2007 Aug 09 10:36 AM
can any one help me out in converting the date to ddmmyyyy
my input date is as yyyymmdd
can any one tell me the function module to covert the date to ddmmyyyy.
thanks in advace.
‎2007 Aug 09 10:40 AM
‎2007 Aug 09 10:40 AM
Hi,
data: date_new(8).
concatenate sy-datum6(2) sy-datum4(2) sydatum(4) into date_new.
Regards, Dieter
‎2007 Aug 09 10:40 AM
Hi..
Try the FMs
CONVERT_DATE_TO_INTERNAL
CONVERT_DATE_TO_EXTERNAL
<b>Reward if Helpful</b>
‎2007 Aug 09 10:42 AM
Hi Siva,
use this FM
CONVERSION_EXIT_IDATE_INPUT
If user has option to give any of format ie,
mmddyyyy or ddmmyyyy and convert to yyyymmdd
it will be difficult for us to do.
suppose if user want to give march 05 2007
he has option to give 03052007 or 05032007.
by coding also we cannot know whether first two digits represents day or month
str = 31122007
year = str + 4(4).
month = str + 2(2).
date = str + 0(2)
concatenate year month date to str1.
reward points to all helpful answers
kiran.M
Message was edited by:
KIRAN KUMAR
‎2007 Aug 09 10:44 AM
Hi
the function module name is
<b><u>HRGPBS_HESA_DATE_FORMAT</u></b>
this will do this
Format a date valid for HESA: DD/MM/YYYY
reward if usefull
‎2007 Aug 09 10:49 AM
Hi
this is the information about the FM
<b><u>HRGPBS_HESA_DATE_FORMAT</u></b>
Format a date valid for HESA: DD/MM/YYYY
Functionality
This module returns a given date in string format "dd/mm/yyyy" with dd = day, mm = month and yyyy = year.
An empty date is returned as space.
This is the required format for HESA reporting.
Example
"19991224" is returned as "24/12/1999".
"00000000" is returned as " " (ten spaces).
Parameters
P_DATE
DATESTRING
Exceptions
Function Group
HRGPBS_HESA_BASIS
reward if usefull
‎2007 Oct 19 2:40 AM
Hi,
Im my PO date (eket-bedat) display out is 01012007 and i want to use this fm to make it become dd/mm/yyyy. how should i code it out?
Is that i need to initial it with the fm?
Thank you.
‎2007 Aug 09 12:23 PM
‎2007 Oct 19 8:01 AM
Hi,
You can use offset. Try like this:
data : a_date(8), "yyyymmdd
t_date(8), "ddmmyyyy
dd(2),
mm(2),
yyyy(4).
dd = a_date+6(2).
mm = a_date+4(4).
yyyy = a_date+0(4).
concatenate dd mm yyyy into t_date.
write t_date.
Regards,
Bhaskar