2009 Sep 28 4:25 PM
Hello Everyone,
Have to convert time/date picked from table to user's time zone .
Tried IB_CONVERT_INTO_TIMESTAMP (Tried others too) .
Converted the time to GMTUK (+/- 0) and then to sy-zonlo.
But nothing seems to work.
Please help.
Thanks
2009 Sep 28 4:35 PM
I've just tried this and it works, what isn't working for you? The code which does the work is this:
CONVERT DATE i_datlo TIME i_timlo
INTO TIME STAMP e_timestamp TIME ZONE l_tzone.
Maybe you can insert this into your program directly?
>
> What was it?
Generosity in awarding points ... Lolz
2009 Sep 28 4:30 PM
Try this
convert date l_date time l_time daylight saving time 'X'
into time stamp result-timestamp time zone sy-zonlo.
Good luck
2009 Sep 28 4:35 PM
I've just tried this and it works, what isn't working for you? The code which does the work is this:
CONVERT DATE i_datlo TIME i_timlo
INTO TIME STAMP e_timestamp TIME ZONE l_tzone.
Maybe you can insert this into your program directly?
2009 Sep 28 5:29 PM
The problem is :
Eg: Time in user's Zone is 12:00:00
In table its stored as 11:00:00
When fetched back it should show 12:00:00, but its showing 11:00:00
if i use the time conversion before showing, it shows 10:00:00
2009 Sep 28 5:30 PM
Use time zone if the server and client is not at same time zone.
The statement that i gave worked fine for me and it is a real time code that i am using in one of my program
2009 Sep 28 5:57 PM
actually i dont hitnk there's a prob with conversion ..
when i change my time zone and see the output .. i get the correct time display ..
but why is the user (with same time zone) not seeing the correct time ? I am checking SU3, should i be checking settings somewhere else ?
Thanks
2009 Sep 28 6:01 PM
Is the user directly logged into SAP? Did the user try logging off and coming back in again?
2009 Sep 28 6:05 PM
well , user hasnt changed his time zone , I did. I am already gettign correct time in both the zones.
User is not getting correct time in his zone.
User data is converted before being saved (-1)
When he fetches back , it should be converted again (+1) for correct time dispaly , but conversion makes it (-2) .
2009 Sep 28 6:09 PM
What is your actual question?
Is that statement/FM not working or problem with displaying the time zone? Please close the thread if you got answer and open up another.
Be clear on what you are asking for?
2009 Sep 28 6:17 PM
what i meant was for me correct data is displayed without calling any conversion in both the zones , but for the user it isnt.
even when i try to use conversion , it doesnt work .. in the sense that it doesnt display the correct converted values !!
2009 Sep 28 6:29 PM
Are you both on the same server and executing this the same way(online vs background)?
2009 Sep 28 6:59 PM
2009 Sep 28 7:05 PM
Can you tell us which table field it is if standard table and if not, please let us know the data element used for your custom field.
2009 Sep 29 2:48 PM
2009 Sep 29 2:55 PM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |