06-28-2016 8:11 AM
Hi All,
when I am trying to convert EST or PST time to UTC time zone (my final result always want in UTC)
cust_tzone = 'UTC'.
PERFORM convert_time_zone USING cust_tzone t_line_data-poddate t_line_data-podtime.
FORM convert_time_zone USING cust_tzone indate intime.
CONVERT DATE indate TIME intime
* DAYLIGHT SAVING TIME 'X'
INTO TIME STAMP zztstamp TIME ZONE cust_tzone.
zzcstamp = zztstamp.
CONDENSE zzcstamp NO-GAPS.
indate = zzcstamp(8).
intime = zzcstamp+8(6).
ENDFORM. "convert_time_zone
Its not converting because my system timezone also 'UTC'.
which ever time i have given same out i am getting will converting to UTC.
Please help me on same
Best Regards,
Raghava
06-28-2016 8:44 AM
Why do you write
cust_tzone = 'UTC'
and not
cust_tzone = 'EST'
if you want to convert EST to an UTC time stamp???
(the time zone passed to TIME ZONE must be available in TTZZ)
06-28-2016 8:44 AM
Why do you write
cust_tzone = 'UTC'
and not
cust_tzone = 'EST'
if you want to convert EST to an UTC time stamp???
(the time zone passed to TIME ZONE must be available in TTZZ)
06-28-2016 9:34 AM
i will get date/time in IDOC with tzone EST .
Need to convert always UTC timezone so i have hard code 'UTC' value .
yes UTC timezone available in TTZZ table
06-28-2016 9:48 AM
No.
CONVERT DATE always produces an UTC time stamp.
You must specify the origin time zone! Or how should the statement know that you want convert from EST to UTC???
You are converting from UTC to UTC ...
06-28-2016 10:10 AM
Yes your correct ,
i have time already in EST (indate :20160628 intime : 12:12:12)
CONVERT DATE indate TIME intime
INTO TIME STAMP zztstamp TIME ZONE 'UTC'.
its giving same values zztstamp :20160628121212
CONVERT DATE always produces an UTC time stamp.
But i am passing values is EST time.
Best Regards,
Raghava
06-28-2016 10:27 AM
So why don't you write
CONVERT DATE indate TIME intime
INTO TIME STAMP zztstamp TIME ZONE 'EST'. now?
06-28-2016 10:56 AM
06-28-2016 11:52 AM
Hi,
DATA : timestamp like TZONREF-TSTAMPS,
time like sy-uzeit,
date like sy-datum.
CALL FUNCTION 'IB_CONVERT_FROM_TIMESTAMP'
EXPORTING
i_timestamp = timestamp
I_TZONE = 'PST'
IMPORTING
E_DATLO = date
E_TIMLO = time.
write 😕 'Date and Time at PST zone is ',date, time.
OR YOU CAN CHECK THIS ALSO
FM CONVERT_INTO_TIMESTAMP or check any FM converttimestamp*.
Thanks.