Forum Discussion
MCFNeil
Qrew Captain
Try something like this (this will handle if its submitted ON the weekend. (starting point, I'll have to come back to deduct the weekend time if its submitted on a Monday kind of thing)
var date SubDateOnly=ToDate([Date/Time Submitted]); //convert date/time to date
var datetime NewSubmitted=ToTimeStamp(ToWeekdayP($SubDateOnly), ToTimeOfDay("11:59 pm")); //create a friday night at midnight timestamp
var datetime AdjustedSubmitted=If(IsWeekday($SubDateOnly), [Date/Time Submitted]), $NewSubmitted); //If its a weekday, use the regular timestamp, otherwise use the friday night time.
$AdjustSubmitted-[Date Created] //put it all together
If your submittals are never greater than a week, then you could add some conditional logic to evaluate the start and end, and if the total is greater than x number (i.e. it includes a weekend time) subtract that 48 hours.
var date SubDateOnly=ToDate([Date/Time Submitted]); //convert date/time to date
var datetime NewSubmitted=ToTimeStamp(ToWeekdayP($SubDateOnly), ToTimeOfDay("11:59 pm")); //create a friday night at midnight timestamp
var datetime AdjustedSubmitted=If(IsWeekday($SubDateOnly), [Date/Time Submitted]), $NewSubmitted); //If its a weekday, use the regular timestamp, otherwise use the friday night time.
$AdjustSubmitted-[Date Created] //put it all together
If your submittals are never greater than a week, then you could add some conditional logic to evaluate the start and end, and if the total is greater than x number (i.e. it includes a weekend time) subtract that 48 hours.
AndreonnaGarret
6 years agoQrew Assistant Captain
Your first response appears to have solved my problem! I will monitor for a while to be sure, but it looks good as of now. Thank you!