Tetiana Sverhun Posted November 13, 2020 Share Posted November 13, 2020 Hi, I need to convert a timestamps to one format. Example, of them: Original => Converted 2020-09-04 18:37:00+02:00 =>2020-09-04 16:37:00 2020-09-02 04:18:42-05:00 =>2020-09-02 09:18:42 2020-09-10 21:13:00+01:00 =>2020-09-10 20:13:00 What is the best way to do it Link to comment Share on other sites More sharing options...
Fabian Duerr Posted November 14, 2020 Share Posted November 14, 2020 You have to play with your string and some conversion functions. My solution assumes that the time shift can only be full hours... First create a [DateTimeColumn] ParseDateTime(left([Timestamps],19),"yyyy-MM-dd HH:mm:ss")Then create a [TimeShiftColumn] and consider your sign (+/-) If(Mid([Timestamps],20,1)="+",Integer(Mid([Timestamps],21,2)),-Integer(Mid([Timestamps],21,2)))Finally calculate the result ([Final]) DateAdd("hour",-[TimeShift],[DateTimeColumn]) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now