Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted

Hi Micahael,

Try,

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

View solution in original post

5 Replies
Highlighted

Hi Micahael,

Try,

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

View solution in original post

Highlighted

May be try like this:

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

Highlighted

Sunny,

Seems you forgot about p. m.

Highlighted
Not applicable

You are my new hero, thanks!

Highlighted

Hahahahaha you are right, may be this:

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