Is date a Sunday?

A

Andï

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?
 
M

Mark Sippitt

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?
 
Top