Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have timestamp column and trying to get max value from this function. But it is displaying null value
=MaxString(Date(Floor(Timestamp#(account_created_datetime)),'DD/MM/YYYY')).
Plese help me on this
Regards,
Kumar
Good catch Stefan. This should also work:
Max(Date(Floor(Timestamp#(SubField(account_created_datetime, '.', 1),'DD/MM/YYYY hh:mm:ss')),'DD/MM/YYYY'))
Firstly you havn't specified what format your timestamp for QlikView to understand:
Try something like this:
=Max(Date(Floor(Timestamp#(account_created_datetime, 'TimeStampFieldFormatHere')),'DD/MM/YYYY'))
Your Timestamp#() function seems not properly parsed the account_created_datetime values.
Please post some sample data.
Hi Sunny,
Thanks for your reply.
I have made changes, but no use.
Max(Date(Floor(Timestamp#(account_created_datetime,'DD/MM/YYYY hh:mm:ss')),'DD/MM/YYYY'))
actually dates are populated like below
you mean that you are still seeing the time component? Would you be able to share a sample of where the above provided expression isn't working?
Try
Max(Date(Floor(Timestamp#(account_created_datetime,'DD/MM/YYYY hh:mm:ss.fff')),'DD/MM/YYYY'))
Good catch Stefan. This should also work:
Max(Date(Floor(Timestamp#(SubField(account_created_datetime, '.', 1),'DD/MM/YYYY hh:mm:ss')),'DD/MM/YYYY'))
Please avoid the Max(Date(Floor ....) redundant formatting operation between the Floor (returns a number) and Max (returns a number). The Date in between serves no purpose as the format is immediately overridden by the Max.
I think you probably mean:
Date(Max(Floor(Timestamp#(account_created_datetime, 'DD/MM/YYYY hh:mm:ss.fff'))), 'DD/MM/YYYY')
Thanks sunny and it is working.
I have a doubt why did you mentioned subfield of '.' ,1 Can you explain
Thanks Jonathan, I am trying to get max month from this date.