Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

timestamp expression

Hi. I need to extract a month and time out of a timestamp that i have which looks like this;

Start Time
01/10/2009 08:00:00 - 08:30:00
01/10/2009 08:30:00 - 09:00:00


and it carries on until 20:00:00, i have tried Month([Start Time]) as Month but this does not work. is there a way to extract the month and the half hour in seperate list boxes?

Thanks

Graham

5 Replies
Miguel_Angel_Baeyens

Hello Graham,

Try

Month(timestamp#([Start Time],'DD/MM/YYYY hh:mm:ss - hh:mm:ss'))


Miguel_Angel_Baeyens

I'm sorry I forget in the previous reply, but how do you want to use the half hour period? You may use

Mid([Start Time],Index([Start Time],' ',1),Len([Start Time]))
to get that part of the timestamp, even using function timestamp# as previous. Are you going to calculate later with the half hours?

prieper
Master II
Master II

Not quite clear, what do you wish to see as result:

is there a way to extract the month and the half hour in seperate list boxes?


Do you wish to see for all the 24*31 entries only October and 00 resp. 30?

Peter

Not applicable
Author

That works perfectly, i only need the half hour as a dimension.

One more quick question, this is a simple one i am sure. How can i display day names, up to now i have only used day numbers, in this chart i would like to use day names.

Thanks for your help.

Graham

Miguel_Angel_Baeyens

To get the day name (monday, tuesday, etc...) use

=Capitalize(Date(timestamp#([Start Time],'DD/MM/YYYY hh:mm:ss - hh:mm:ss'),'WWWW'))


In the example above, 'WWWW' will give you "Monday", 'WWW' will give you "Mon". Use or don't Capitalize() to get first letter in Uppercase.