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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top