2 Replies Latest reply on Aug 20, 2018 7:07 AM by Naveen B

    Convert number to HH:MM:SS

    Daniel Segura

      Hello,

       

      I need a computation to say:

       

      For January: set a value of 00:01:00

      For February: a value of 00:02:00

      and so on...

       

      I'm sure there's a way but, I'm trying it like this:

      IF DATEPART('month', [Reporting Day ],'sunday') = 1

      THEN

          datetime(60/86400)

      ELSE IF DATEPART('month', [Reporting Day ],'sunday') = 2

      THEN

          datetime(2/86400)

      END

      END

       

      But I'm getting an error.

       

      I was thinking of feeding the calculation with an integer representing time in seconds or milliseconds but I'm not even sure where to start.

       

      I'm using Tableau Online.

       

      Thank you,

       

      Daniel.