‎2007 May 08 11:34 AM
Dear All,
I badly need help in Date conversions. I am getting the date in the format say
22122007 (DDMMYYYY) can you help me in converting this to 22.12.2007 (DD.MM.YYYY).
Any help in this regard would be very very helpful.
Thanks a Lot In Advance,
Vinay
‎2007 May 08 11:39 AM
DATA TIME TYPE T VALUE '154633'.
WRITE (8) TIME USING EDIT MASK '__:__:__'. "Output: 15:46:33
Regards
prabhu
‎2007 May 08 11:36 AM
data : v_date1(8) value '22122007',
v_date2(10).
concatenate v_date1+0(2) v_date1+2(2) v_date1+4(4) into v_date2 separated by '.'.
write : v_date2.
‎2007 May 08 11:37 AM
Hi Vinay
<b>Converting dates</b>
<b>DATE_CONV_EXT_TO_INT Conversion of dates to SAP internal format e.g. '28.03.2000' -> 20000328 Can also be used to check if a date is valid ( sy-subrc <> 0 )</b>
Good Luck and thanks
AK
‎2007 May 08 11:38 AM
data : dt(10) value '22032007'.
write : / dt using edit mask '__.__.____'.
regards
shiba dutta
‎2007 May 08 11:38 AM
Hi
data: g_date(10) type c.
g-date = sy-datum.
CONCATENATE g_date6(2) '.' g_date4(2) '.' g_date+0(4) INTO g_date.
Regards,
Sreeram
‎2007 May 08 11:39 AM
hi,
take variables V1, V2, V3.
V1 = date+0(4).
V2 = date+4(2) or 5(2). Check it
V3 = date+6(2) or 7(2). check it.
Concatenate V3 V2 V1 into date separated by '.'
Now, date will have DD.MM.YYYY
Regards
Reshma
‎2007 May 08 11:39 AM
DATA TIME TYPE T VALUE '154633'.
WRITE (8) TIME USING EDIT MASK '__:__:__'. "Output: 15:46:33
Regards
prabhu
‎2007 May 08 11:40 AM
Hi
Try like this
DATA: v_date type d.
v_date = '22122007'.
write:/(10) v_date using edit mask '__.__.____'.
Regards
Haritha.
‎2007 May 08 11:45 AM
Hi.
Very simple, always works, and uses the user definitions.
Write your source field (dats) to a target char(10) field like this:
WRITE: source to target DD/MM/YYYY.Hope this helps.
Reward helpfull ideas.
Best regards.
Valter Oliveira.