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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Qlikview : Max of date value

Hi please help,

I have a value of date with the ff format :

2013-06-24 12:21:45

2013-06-24 12:21:46

i want to get the 2nd row with the value of "2013-06-24 12:21:46"

however using max function doesn't seem to work,

thanks for the input!

Note : i cannot change that date format, for i am filtering on all date and time aspect,, year-month-day-hour-min-ss

1 Solution

Accepted Solutions
Sokkorn
Master
Master

Hi,

Max function should work if your DateField is a proper date format. If it doesn't work, I assume that your DateField is a text format or else.

Let try =Date(Max(Date(Date#(DateField,'yyyy-MM-dd hh:mm:ss'))),'yyyy-MM-dd hh:mm:ss')

Regards,

Sokkorn

View solution in original post

2 Replies
Sokkorn
Master
Master

Hi,

Max function should work if your DateField is a proper date format. If it doesn't work, I assume that your DateField is a text format or else.

Let try =Date(Max(Date(Date#(DateField,'yyyy-MM-dd hh:mm:ss'))),'yyyy-MM-dd hh:mm:ss')

Regards,

Sokkorn

Not applicable
Author

date(Max(date(date#(datefield,'YYYY-MM-DD hh:mm:ss'),'YYYY-MM-DD hh:mm:ss')))  as maxdate

*******************************************************************************************************************

or try this if your other field in table.

load

field1,

date(Max(date(date#(datefield,'YYYY-MM-DD hh:mm:ss'),'YYYY-MM-DD hh:mm:ss')))  as maxdate

group by field1;