sam215 Posted October 10, 2013 Posted October 10, 2013 How to format time in 24 hour format e.g 10/10/2013 05:20:18 PM to 10/10/2013 17:20:18
LaRetta Posted October 10, 2013 Posted October 10, 2013 So ... 10/10 ... which is month and which is day? :-) Well, we should be safe if we stick to the right functions. Maybe try: Let ( [ t = GetAsTime ( timestampField ) ; secs = GetAsNumber ( t ) ] ; t + ( secs ≥ 43200 and PatternCount ( timestampField ; "pm" ) ) * 3600 ) 1
comment Posted October 10, 2013 Posted October 10, 2013 How to convert 10/10/2013 05:20:18 PM to 10/10/2013 17:20:18 Not sure what exactly you mean by "convert". The title of the thread is "Format timestamp"; so perhaps all you need to do is format the field to display the time in 24 hour format? 1
sam215 Posted October 10, 2013 Author Posted October 10, 2013 Thanks LaRetta Its works but its count 1 hr more e.g 10/10/2013 05:20:18 PM Result is: 18:20:18 not 10/10/2013 17:20:18
eos Posted October 10, 2013 Posted October 10, 2013 Try "10/10/2013 05:20:18 PM" as argument for GetAsTimestamp().
comment Posted October 10, 2013 Posted October 10, 2013 (edited) All three of you. Edited October 10, 2013 by comment
comment Posted October 10, 2013 Posted October 10, 2013 That's merely a coincidence, because your file/OS is set to use the 24-hour time format. Had you opened a file created in a 12-hour locale, you would see this: Â
Recommended Posts
This topic is 4119 days old. Please don't post here. Open a new topic instead.
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