Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Compare if Datetime is Before a Time

Hello, I am trying to create a new column by comparing if the datetime is before 5pm on the same day. For example:   If [datetime column] is before 5 pm then "Attend Appt" else "Miss Appt".   Is ...
  • Samarth_18's avatar
    4 years ago

    Hi Anonymous ,

     

    Create a column with below code:-

    Column = if(HOUR('Table (2)'[Datetime]) < 17,"Attend Appt","Miss Appt")

     

    Thanks,

    Samarth