02-14-2007 12:42 PM
Hi All,
I have a small requirment that user wanted both date and time in the format of
DDMMYYHHMMSS, how i can get this.(Please note that user wanted last two digits of the year),Please advice me..
Thanks in advance
Regards,
Sarala.
02-14-2007 12:45 PM
data: v_datetime(12).
concatenate sy-datum6(2) sy-datum4(2) sy-datum+2(2)
sy-uzeit into v_datetime.
Regards,
Ravi
Message was edited by:
Ravi Kanth Talagana
02-14-2007 12:45 PM
data: v_datetime(12).
concatenate sy-datum6(2) sy-datum4(2) sy-datum+2(2)
sy-uzeit into v_datetime.
Regards,
Ravi
Message was edited by:
Ravi Kanth Talagana
02-14-2007 12:47 PM
you need to develop a format using concatenate of
date and time to achieve this .
declare date as variable " get DDMMYY and
time as variable into final variable .
this can be done .
execute the code .
<b>parameters :p_date like sy-datum.
data : val(16) type c,
date(6) type c,
time(6) type c,
mon(2) type c,
yr(2) type c,
day(2) type c.
day = p_date+6(2).
yr = p_date+2(2).
mon = p_date+4(2).
concatenate day mon yr into date.
time = sy-uzeit.
concatenate date time into val.
write:/ val.</b>
regards,
vijay
02-14-2007 1:02 PM
Hi,
I hope following code will solve your problem.
DATA : v_datum TYPE sy-datum,
v_time TYPE sy-uzeit,
v_string TYPE string.
v_datum = sy-datum.
v_time = sy-uzeit.
CONCATENATE v_datum+6(2) v_datum+4(2) v_datum+2(2) v_time INTO v_string.
Reward points if the answer is helpful.
Regards,
Mukul
02-14-2007 1:08 PM