Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Panv
Contributor II
Contributor II

Get Max of Date Time Field that is originally string

I have a date time field (update_time)  I'm pulling that has the following format:
2021-08-13 23:59:53.855000+00:00

I need to get the max of this field in a KPI

When I do Timestamp#(update_time,'YYYY-MM-DD hh:mm:ss.ffffff') as update_time, the field displays in the table but max(update_time) shows null

When I do  Timestamp(Timestamp#(update_time,'YYYY-MM-DD hh:mm:ss.ffffff')) as update_time, all values in the field show as null and don't appear on the table and I'm unable to use the max function on it obviously

How can I render the field properly so that it shows max of it

1 Solution

Accepted Solutions
Kushal_Chawda

@Panv  try below

Timestamp(Timestamp#(subfield(update_time,'+',1),'YYYY-MM-DD hh:mm:ss[.ffffff]')) as new_update_time

View solution in original post

2 Replies
Kushal_Chawda

@Panv  try below

Timestamp(Timestamp#(subfield(update_time,'+',1),'YYYY-MM-DD hh:mm:ss[.ffffff]')) as new_update_time

Panv
Contributor II
Contributor II
Author

Ahh great, ty!! I didnt realize the +00 needed to be removed, thought it will be part of timestamp format.

thanks a lot!