Forum Discussion

eWise's avatar
eWise
Icon for Helper II rankHelper II
5 years ago
Solved

Dateadd function to give a later date

Hi all,

 

I have a datetime column and I need an adjusted datetime column where if an entry falls on a saturday, the adjusted datetime goes to the following Monday 9 a.m. else the datetime remains remains unchanged like below. 

 

DayOfWeekDateTimeAdjustedDateTime
Sat4/10/2021 11:004/12/2021 9:00
Mon3/29/2021 9:203/29/2021 9:20

 

Thanks for the help. 

2 Replies

  • eWise 

    You can add the following calculated column to your table:

    Adjusted DateTime = 
    
    IF(
        WEEKDAY([DateTime]) = 7,
        INT([DateTime]) + 2 + TIME(9,0,0),
        [DateTime]
    )