Forum Discussion

ggzmorsh's avatar
ggzmorsh
Helper II
6 years ago
Solved

IF statement for time

I need an IF statement where if a specific column has a Date and Hour it would get me the Final Date by checking a separate hour table or a condition that if the Hour is between 00:00:00 and 08:00:00...
  • az38's avatar
    6 years ago

    Hi ggzmorsh 

    try 

    Final Time = IF([Hour] < TIME(8,0,0),Date1 - 1,Date1)

    or

    Final Time = IF(TIME(VALUE(LEFT([Hour],2)),00,00) < TIME(8,0,0),Date1 - 1,Date1)

     

    do not hesitate to give a kudo to useful posts and mark solutions as solution