Discussions

Expand all | Collapse all

I would like to add three working days to a date time field.How should I do it

  • 1.  I would like to add three working days to a date time field.How should I do it

    Posted 04-30-2019 17:10


  • 2.  RE: I would like to add three working days to a date time field.How should I do it

    Posted 04-30-2019 18:26
    That's a tough one. Generally with a date/time field you would just add hours to it for the days but that doesn't work for business days. There might be a way to do this if you had a formula that determined the day of the week and if it was Friday it would add 120 hours which should result in it being placed on Wednesday of the next week, if that makes sense.

    I've seen a formula for figuring out the day of the week on this forum before so it should just be a search away. There might be a better way to do it though.


  • 3.  RE: I would like to add three working days to a date time field.How should I do it

    Posted 04-30-2019 19:09
    Thank you 


  • 4.  RE: I would like to add three working days to a date time field.How should I do it

    Posted 04-30-2019 20:21
    not tested but try this


    var datetime MyDateTime = [my date time field];
    var date MyDate = ToDate($MyDateTime ]);
    var timeofday Time = ToTimeOfDay $MyDateTime;
    var date  NewDate = WeekDayAdd($MyDate, 3)

    ToTimeStamp($NewDate, $Time)

    If there is a problem with the formula, please post the formula and the error message.