Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi everyone.
My question is : How to exclude only sunday from dates?
i have 1 common date field named [ship date]
i want to subtract this by 2 that means [Ship date - 2(days)]
eg: if ship date= 28-09-2018 then according to this formula [Ship date - 2(days)]=26-09-2018 >>[ date1]
so assume the date we got after subtracting, is [date 1]
If my date field [date1] is sunday then i want to display date using same formula with [Ship date - 3(days)] but
if my date field [date1] is working day (from monday to saturday) then i want to display date as [Ship date - 2(days)]
use weekday function
and exclude where value is 6
How about:
Date(if(WeekDay(ShipDate)='Tue', ShipDate-3, ShipDate-2)) as [date 1]
-Rob
I used the below formula which calculates the data perfectly for me :
if(weekday([date 1])=WeekDay(1),date([Ship date]-3),date([Ship date]-2))