Is date a Sunday?

  • Thread starter Thread starter =?ISO-8859-1?B?QW5k7w==?=
  • Start date Start date
?

=?ISO-8859-1?B?QW5k7w==?=

I have a form for entering job details for recharging, which includes date of job, hours overtime worked, and overtime rate, which defaults to 1.5.

What I need to do is along the lines of ...
If [datefield] = "Sunday" then [over-time-rate.value] = 2

But I need to know how to get the "day" out of the date. Is this possible?
 
Andi,

You could use the WeekDay Function.

Therefore:

If WeekDay([DateField],vbSunday) = 1 Then .....

Hope this helps.

Mark
-----Original Message-----
I have a form for entering job details for recharging,
which includes date of job, hours overtime worked, and
overtime rate, which defaults to 1.5.
What I need to do is along the lines of ...
If [datefield] = "Sunday" then [over-time-rate.value] = 2

But I need to know how to get the "day" out of the date. Is this possible?
 
Back
Top