October 10, 201312 yr How to format time in 24 hour format e.g 10/10/2013 05:20:18 PM to 10/10/2013 17:20:18
October 10, 201312 yr 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 )
October 10, 201312 yr 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?
October 10, 201312 yr Author 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
October 10, 201312 yr 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: Â
Create an account or sign in to comment