Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Please let me know if this Date is Correct or Not?

Status
Not open for further replies.

hello101

Instructor
Jun 26, 2006
18
US
If (DatePart("w", Date1) = 1

That means of the Day is Sunday !

What about

If(DatePart("y", Date1) = 16 (Does this indicate that the day = Martin L King Day) ??

Thank you
 
If DatePart("y", Date1) = 16 then date1 is 16 january.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Hi,

Tks for the help but there's an If statement!
I want to check in my module if a specific day is a business day or not. so if i have in a table a date such as 1/16/2006 and i write in my module

If DatePart("y", Date1) = 16 would it recognize that date as a holiday (for sure after the whole method is called from a query for example)

Tks
 
Create a holyday table and have a look at the DLookUp function.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top