5 Replies Latest reply: May 13, 2015 10:08 AM by Sunny Talwar RSS

    Create a timestamp from two string fields

    Aaron Kelly

      Let me start by saying I'm using Qlik Sense. I have a date field and a time field. Both of these are stored as six character strings in the database. I want to take them and make them a single date/time field. Examples below.

       

      DateTimeResult
      05121501331305-12-2015 01:33:13
      12131423324512-13-2014 23:32:45

       

      I've tried something something like this to make it work but it's just now working out for me:

      Timestamp#(Date#("date",'MMDDYY')&' '&Time#("time",'HHMMSS'), 'MM-DD-YYYY HH:MM:SS)

       

      The above expression gives me values that look like:

      40461 205645 (10/10/2010 20:56:45)

      40462 214058 (10/11/2010 21:40:58)

      42136 163018 (5/12/2015 16:30:18)

       

      What am I doing wrong???

       

      I realize the number in place of the date is the number of days since the epoch but for whatever reason, it's not generating a number like 42136.687518