2 Replies Latest reply on Feb 24, 2014 10:18 AM by Matthew McLaughlin

    Formatting as time

    Matthew McLaughlin

      Morning all!


      Working on a map to show where a user-defined work order is.  I have a date field and a time field that are separate and I'm trying to combine.  My times iSeries doesn't store the preceding zeroes so 1:07:22 am appears as 10722.  I need to format this as a Tableau-recognized time.


      I tried to add the zeroes using the below:


      if (len(str([TTIME]))=5) then "0" + STR([TTIME])

      elseif (len(str([TTIME]))=4) then "00" + STR([TTIME])

      elseif (len(str([TTIME]))=3) then "000" + STR([TTIME])



      ..then adding this to the time and converting to DATETIME:


      datetime(str([Transaction Date]) + " " + [Calculation1])



      ...but get strange transformations like:




      I'm certain this is not the correct way to get what I'm looking for....any suggestions???


      Thanks in advance!