1 Reply Latest reply on Oct 16, 2017 12:10 PM by Amina Khan

    Extract time from a datetime field

    Amina Khan

      This is what I have in SQL:

      case when ((convert(varchar(8),ci.OccurredDatetime,108) > '07:00:00' and convert(varchar(8),ci.OccurredDatetime,108) < '14:59:00')) then left('Days', 12)

      when ((convert(varchar(8),ci.OccurredDatetime,108) > '15:00:00' and convert(varchar(8),ci.OccurredDatetime,108) < '22:59:00')) then left('Swings', 12) else left('Mids', 12)

      end 'Shift',

       

      I need to convert it into a calculated field in Tableau 10.2.

      Please help...