Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

From 12 to 24 fomat problem

Hi, i have some data(timestamp) with the next format:

01:00 a. m.

01:01 a. m.

01:02 a. m.

and so on..

I need this to be in 24 format, im trying with this:

Timestamp(Timestamp#(MyTimeStampFieldin12HrsFormat,'h:mm:ss TT') ,'hh:mm:ss') as MyTimeStampFieldin24HrsFormat


also im trying this formats:


h:mm T.T.

h:mm T. T.

h:mm T T


none of this seems to work. do you have any idea how i can do this?

Thanks!

1 Solution

Accepted Solutions
tamilarasu
Champion
Champion

Hi Micahael,

Try,

Timestamp(Timestamp#(Purgechar(MyTimeStampFieldin12HrsFormat, '.: ' ),'hhmmtt'), 'hh:mm:ss' ) as MyTimeStampFieldin12HrsFormat

View solution in original post

5 Replies
tamilarasu
Champion
Champion

Hi Micahael,

Try,

Timestamp(Timestamp#(Purgechar(MyTimeStampFieldin12HrsFormat, '.: ' ),'hhmmtt'), 'hh:mm:ss' ) as MyTimeStampFieldin12HrsFormat

sunny_talwar

May be try like this:

=Time(Time#(Replace(MyTimeStampFieldin12HrsFormat, 'a. m.', 'am'), 'hh:mm TT'), 'hh:mm')

tamilarasu
Champion
Champion

Sunny,

Seems you forgot about p. m.

Not applicable
Author

You are my new hero, thanks!

sunny_talwar

Hahahahaha you are right, may be this:

=Time(Time#(Replace(MyTimeStampFieldin12HrsFormat, '. m.', 'm'), 'hh:mm TT'), 'hh:mm')