2009 Mar 12 5:33 AM
Hi,
I have a problem where I have to convert local time into UTC which I need to send to another system, I need to be able to send the UTC offset at the end eg.
internal timestamp = 20090312033000
output timestamp with UTC offset 2009-03-12T0333000+11
Thanks,
Steve.
Hi,
I have a problem where I have to convert local time into UTC which I need to send to another system, I need to be able to send the UTC offset at the end eg.
internal timestamp = 20090312033000
output timestamp with UTC offset 2009-03-12T0333000+11
Thanks,
Steve.
2009 Mar 12 5:34 AM
hi:
have a look
[link|http://help.sap.com/abapdocu/en/ABAPCONVERT_TIME-STAMP.htm]
Regards
Shashi
2009 Mar 12 5:36 AM
Hi,
Try this FM ISU_DATE_TIME_CONVERT_TIMEZONE
Regards
Bala Krishna
2009 Mar 12 5:37 AM
2009 Mar 12 5:37 AM
Hi,
pls see the following statement:
DATA: l_timestmp1 TYPE comt_changed_at_usr,
s_date TYPE sy-datum.
CONVERT DATE s_date TIME '000000' INTO TIME STAMP l_timestmp1 TIME
ZONE sy-zonlo.
Keerthi.
2009 Mar 12 5:38 AM
2009 Mar 12 5:41 AM
Hi,
Use this FM 'ISU_DATE_TIME_CONVERT_TIMEZONE'
Regards,
Jyothi CH.
2009 Mar 12 5:44 AM
None of the above answers give me the offset they just convert into timestamp, I need the offset.
2009 Mar 12 5:48 AM
Hi,
Try these FM's
/AIN/DM_CONVERT_LOCAL_TO_UTC - Conversion from Local to UTC Timestamp
Regards,
Jyothi CH.
2015 Oct 07 4:23 AM
Hi, did you find the way to convert local time to UTC with offset? cause I'm facing the same problem... thanks!
2015 Dec 10 6:43 PM
Hi, use FM TZON_GET_OFFSET
IF_TIMEZONE -> sy-zonlo
IF_LOCAL_DATE -> sy-datum
IF_LOCAL_TIME -> sy-uzeit
then use exporting parameters:
EF_UTCDIFF -> 03:00:00
EF_UTCSIGN -> -
in my case.
concatenate the variables to get the format required:
CONCATENATE sy-datum(4) '-' sy-datum+4(2) '-' sy-datum+6(2)
'T' sy-uzeit(2) ':' sy-uzeit+2(2) ':' sy-uzeit+4(2) EF_UTCSIGN EF_UTCDIFF
INTO vl_utc_date_time.
For me, it was required to use de following format:
"YYYY-MM-DDThh:mm:ss±of:om" where:
YYYY indicates the year
MM indicates the month
DD indicates the day
T indicates the start of the required time section
hh indicates the hour
mm indicates the minute
ss indicates the second
± indicate if the offset is positive or negative
of indicate the offset in hour respect the UTC time
om indicate the offset in minute respect the UTC time
Hope it helps!
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |