[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 496
  • Last Modified:

Formula to differentiate beween week and weekend

I need to create a formula that can distinguish between days from Monday 09:00 to Friday 14:59:59 - display "Week rate : $12,00" and Friday 15:00 to Monday 08:59:59 - display "Weekend rate : $10,00"
0
John-S Pretorius
Asked:
John-S Pretorius
1 Solution
 
mlmccCommented:
Try this

If DayofWeek({YourDateField}) IN [3,4,5] then
    "Week rate: $12.00"
Else if DayofWeek({YourDateField}) IN [1,7] then
    "Weekend Rate: $10.00"
Else if DayofWeek({YourDateField}) = 6 then
(
      If Time({YourDateField}) < Time(15,0,0) then
          "Week rate: $12.00"
      Else
         "Weekend Rate: $10.00"
)
Else
(
      If Time({YourDateField}) >= Time(9,0,0) then
          "Week rate: $12.00"
      Else
         "Weekend Rate: $10.00"
)

mlmcc
0
 
John-S PretoriusAuthor Commented:
Thank you so much, great work as always.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now