3 Replies Latest reply on Sep 15, 2016 12:57 PM by David Li

    Select Max(timestamp) in Tableau

    Anil Pottem

      Hi All,


      I have a unique situation .

       

      I have a loaddate_dttm whose values are as listed below

       

      load_date_dttm

       

      9/15/2016 8:42:00 AM

      9/15/2016 10:47:27 AM

      9/15/2016 10:53:17 AM

      9/15/2016 10:18:54 AM

      9/15/2016 1:39:19 PM

      9/15/2016 10:05:29 AM

      9/15/2016 10:23:04 AM

       

      I extracted the Timestamp using below calculation from this as user is looking for the latest Load time on the dashboard.

       

      Calculation for Extraction of timestamp :

       

      str(int(datepart('hour',[load_date_dttm])))+':'+ str(int(datepart('minute',[load_date_dttm])))+':'+ str(int(datepart('second',[load_date_dttm])))

       

      Now the data looks like below shown

       

      8:42:00 AM

      10:47:27 AM

      10:53:17 AM

      10:18:54 AM

      1:39:19 PM

      10:05:29 AM

      10:23:04 AM

       

      Now I want to do the Max on this time stamp .

       

      Max Calculation :

       

      str([Load Time])+ Str(" ET ")

       

      the result I'm getting is 09:59:53 AM ET

       

      This is not correct .

       

      Can someone please help me on how to get the max out of Timestamp.