on 05-09-2008 8:29 AM
Hi,
We have our system time as CET . hence the printouts time is displayed as per system time. But i want the user date and time to be printed as per his local time zone. I have used sy-uzeit but it is a system time. can anyone help if there is another system variable which stores user local time & date. Else any function module by which we can convert the sys time to user time.
Thanks. Points will be given to useful answers
form convert_date_time .
data: l_tzone type timezone.
constants: c_cet type timezone value 'CET'.
Fetch system time zone
call function '/ISDFPS/GET_SYSTEM_TIME_ZONE'
importing
time_zone = l_tzone.
Convert to time zone CET
call function '/ISDFPS/CONV_TIME_ZONE'
exporting
old_date = sy-datum
old_time = sy-uzeit
old_time_zone = l_tzone
new_time_zone = c_cet
importing
new_date = g_date
new_time = g_time
exceptions
invalid_time_zone = 1
others = 2.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
endform. " CONVERT_DATE_TIME
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try FM 'IB_CONVERT_INTO_TIMESTAMP'
Reward if helpful.
Tyken
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.