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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Karahs
Partner - Creator
Partner - Creator

Date ()

Hello everyone,


i have date in following format 07/09/2016 08.55 PM need to find the month and year for the following date.Made use of the Function Month(),Year(), Date(Date#([Date field], 'dd/MM/yyyy hh.mm pp'), 'M/d/yyyy') as open_Date but all are giving blanks.Can anyone Suggest?.

Thanks in advance!!

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Sunny is correct, except I think you have a period instead of a colon for a date separator.

=Date(Date#([Date field], 'dd/MM/yyyy hh.mm TT'), 'M/d/yyyy')

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

5 Replies
sunny_talwar

Try this:

Month(Date#([Date field], 'dd/MM/yyyy hh:mm TT')) as Month,

Year(Date#([Date field], 'dd/MM/yyyy hh:mm TT')) as Year,

Date(Floor(Date#([Date field], 'dd/MM/yyyy hh:mm TT'))) as Date,

TimeStamp(Date#([Date field], 'dd/MM/yyyy hh:mm TT')) as TimeStamp

Karahs
Partner - Creator
Partner - Creator
Author

Hello Sunny,

I tried doing this but it comes as blank

shraddha_g
Partner - Master III
Partner - Master III

Try:

month(date(floor(TImestamp#([Date field],'DD/MM/YYYY hh.mm TT')))) as Month,

year(date(floor(TImestamp#([Date field],'DD/MM/YYYY hh.mm TT')))) as Year

I hope it is helpful.

jonathandienst
Partner - Champion III
Partner - Champion III

Sunny is correct, except I think you have a period instead of a colon for a date separator.

=Date(Date#([Date field], 'dd/MM/yyyy hh.mm TT'), 'M/d/yyyy')

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Karahs
Partner - Creator
Partner - Creator
Author

Thankyou Jonathan , even Sunny was right had a period instead of a colon for date separator.