Forum Discussion

gkakun's avatar
gkakun
Helper III
5 years ago
Solved

Time Comparison

Hi, I have a table with timestamp and Im trying to build the logic, if the time is between 20:15 and 8:14 it's "night shift", else, it's" day shift". I tool the hour to different column but the logic...
  • amitchandak's avatar
    5 years ago

    gkakun , Logic seem right. Try Or and  Try with .time

     

    Test = if(OR('Cust Order Cube'[Create Time]>=TIME(20,15,0),'Cust Order Cube'[Create Time]<=TIME(8,14,59)),"Night","Day")

     

    Test = if('Cust Order Cube'[Create Time].time>=TIME(20,15,0) || 'Cust Order Cube'[Create Time].time<=TIME(8,14,59),"Night","Day")