Forum Discussion

Lenihan's avatar
Lenihan
Helper III
8 years ago
Solved

Using Datediff but date and time data split

Hi,  I had split my date/time columns for some calculated columns earlier, but, now, I've been asked to calculate difference between two dates, and for this I need both date and time. Is this possib...
  • jthomson's avatar
    8 years ago

    I woulodn't have thought you'd have need to rejoin anything - the only time you need to be concerned about the time is if the start and end dates are precisely one day apart. Just go for a comparison like:

     

     

    if (end date - start date) >=2 then "not within 24 hours", else

    if (end date - start date) = 1 and (end time > start time) then "not within 24 hours" else "within 24 hours"