4 Replies Latest reply: Apr 18, 2012 1:57 PM by John Blair RSS

    Another Date Calculation Question

      I am new to QlikView and am using QlikView for Windows version 11.  I am having difficulting subtracting 1 date/time from a second date/time.  I am using a CSV file as my datasource.  Based on my abilty to concatenate the date/times, I believe the date/times are recognized as strings by Qlikview.

       

      I have tried the timestamp#, date#, date functions but always get '-' for my answer.  I have perused the QlikView Reference Manual and the QlikView Time and Date primer documents found during my google searches.  I have tried converting the string into an actual date/time but have failed miserably.

       

      Examples of my date/time data are:  3/20/2012 11:15  and 3/16/2012 8:47  (I have also uploaded my source file)

       

      I have used the following formats to no avail:

      (DATE([Logon time],'M/D/YYYY h:mm')) as LogonTimeDate

      (DATE([Logon time],'M/D/YYYY hh:mm')) as LogonTimeDate

      (DATE([Logon time],'M/D/YYYY hh:mm:ss')) as LogonTimeDate

      (DATE([Logon time],'M/D/YYYY h:mm:ss')) as LogonTimeDate

      (DATE([Logon time],'M-D-YYYY h:mm')) as LogonTimeDate

      (DATE([Logon time],'M-D-YYYY hh:mm')) as LogonTimeDate

      (DATE([Logon time],'M-D-YYYY hh:mm:ss')) as LogonTimeDate

      (DATE([Logon time],'M-D-YYYY h:mm:ss')) as LogonTimeDate

       

      Any guidance would be mucho appreciated!

       

      Thanks,

      John