2007 Nov 29 5:53 PM
Hello All,
Can anyone tell me if there is any Function Module to convert the TIME from GMT to CST?
Regards
Hello All,
Can anyone tell me if there is any Function Module to convert the TIME from GMT to CST?
Regards
2007 Nov 29 6:01 PM
Hi Sunil,
use the following code.
DATA :
timestamp like TZONREF-TSTAMPS,
time like sy-uzeit,
date like sy-datum.
The following function module is used to convert the
time and date into GMT timestamp
CALL FUNCTION 'IB_CONVERT_INTO_TIMESTAMP'
EXPORTING
i_datlo = sy-datum
i_timlo = sy-uzeit
I_TZONE = 'INDIA'
IMPORTING
E_TIMESTAMP = timestamp.
The following function module is used to convert the
above obtained timestamp to PST timezone date and time.
CALL FUNCTION 'IB_CONVERT_FROM_TIMESTAMP'
EXPORTING
i_timestamp = timestamp
I_TZONE = 'CST'
IMPORTING
E_DATLO = date
E_TIMLO = time.
write 😕 'Date and Time at PST zone is ',date, time.
Reward if helpful.
Thanks,
Naveen.
2007 Nov 29 6:23 PM
Get the time difference using the following Logic:
1) Use table TTZZ to get the ZONERULE, DSTRULE and FLAGACTIVE
for TZONE = 'CST'.
2) Then use table TTZR with ZONERULE and FLAGACTIVE to get the time difference in field UTCDIFF, and the operator (+/-) in field UTCSIGN,
3) Also refer to table TTZD for Summer time rules(day light saving).
Then use table TTZD with DSTRULE and FLAGACTIVE to get the DSTDIFF.
<b>Add up UTCDIFF and DSTDIFF to get the time difference.</b>
Use this time difference to calculate time in CST.
Lokesh
Pls. reward points if it helps.
2008 Feb 20 4:17 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |