Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Convert Time Stamp

Hi ALL,

I have this TimeStamp 'Jan 28 2016 14:56:37 GMT' I try to get the month and to do that I procede like this :

1.Timestamp#(Left(start,20),'MMM.DD.YYYY hh:mm:ss') return Jan 28 2016 14:56:37 but when add the monthName or Month function didn't return any data " Month(Floor(Timestamp#(Left(start,20),'MMM.DD.YYYY hh:mm:ss')))as Dat,"

2."Date(Date#(start,'MMM.DD.YYYY hh:mm:ss'),'MMM.DD.YYYY')as Dat" I try this to start by diplay the date then I will get the month but it didn' work too!!!!!!!

3: I try this"Date(Floor((Timestamp#(Left(start,20),'MMM.DD.YYYY hh:mm:ss')))) "as Dat,' but it didn't return any data too:

Help !!!

1 Solution

Accepted Solutions
swuehl
MVP
MVP

There are not dots in the timestamp format, so try removing them

Month(Timestamp#(Left(start,20),'MMM DD YYYY hh:mm:ss')) as Dat


or just


Month(Timestamp#(Left(start,11),'MMM DD YYYY')) as Dat

View solution in original post

6 Replies
sunny_talwar

If you just need Month, you can try this:

Month(Date#(Left('Jan 28 2016 14:56:37 GMT', 3), 'MMM')) as Month

or this to get the MonthNum

Num(Month(Date#(Left('Jan 28 2016 14:56:37 GMT', 3), 'MMM'))) as MonthNum


UPDATE: Also make sure that you correctly read the dateformat when you are using Date# or TimeStamp# functions

This -> Timestamp#(Left(start,20),'MMM.DD.YYYY hh:mm:ss') is not going to work because of the dots you have after MMM and DD (in red). Do you see those in your date? I don't, so why use them in your date formatting. You need the format without the dots like this:

Timestamp#(Left(start,20),'MMM DD YYYY hh:mm:ss') and then you can use your Date, Month, Day, MonthName, Year functions.

Read through these blogs to increase your understanding on how dates are read in QlikView

Get the Dates Right

Why don’t my dates work?

swuehl
MVP
MVP

There are not dots in the timestamp format, so try removing them

Month(Timestamp#(Left(start,20),'MMM DD YYYY hh:mm:ss')) as Dat


or just


Month(Timestamp#(Left(start,11),'MMM DD YYYY')) as Dat

View solution in original post

Not applicable
Author

Thank you .

Not applicable
Author

Thank you .

oknotsen
Master III
Master III

If your question is now answered, please flag the Correct Answer.

If not, please let us know with which part of your question you still need help .

May you live in interesting times!
Not applicable
Author

Hi Onno,

I tried the two suggestions and they work well ,

Done for the mention .