2 Replies Latest reply: Apr 26, 2017 8:27 AM by Vineeth Pujari RSS

    DateTime Conversion

    Mark Ritter

      I have a field coming from my source that is a datetime field in MS SQL table.


      I want to convert this to the numeric value for the date/time like Qlik does internally.


      This is the code in the script.  The field that I am working with is ImportTime.  The variable is already in the numeric form.


      The reason that I am doing this is when all dates were in regular date/time format the where clause was ignoring the seconds of the time and I was getting duplicates.


      I can't figure out what I need to code in SQL to do this conversion.



        LOAD * ;

        SQL SELECT *

        from Source

        WHERE ImportTime > $(vDeltaFieldValue)

                  And Branch < '800';