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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custom look up date function

Status
Not open for further replies.

ktb916

Programmer
Jan 22, 2004
76
US
I want to create a function that will look up a date in a table to find out if it is a working day, holiday, weekend, or shut down day. If the date is anything other than a working day I want to return a date that is the first working day prior to the date in question. Any suggestions?

Thanks

KT
 
Any suggestions?
Yes, have a look in the FAQ area of this forum, HowTo section.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Are you saying my question is too vague? I'll try to explain a little better. I have a date I want to compare to a date in a table that has a corresponding code - D = working day H = Holiday or S = Shut down. If the date is a working day the function returns the same date. If the date is a weekend, holiday or shutdown date it needs to return the first working day prior to the date in question. I was thinking of subtracting 1 day from the date and then comparing it again until I hit a working day but I was hoping there was some kind of function that already existed that could simply look up the first available working day.

I'm slow - but I want to learn

Thanks
KT
 
Are you saying my question is too vague?
No, I said that a FAQ in this forum covers your issue.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
My mistake - I was clicking on the links at the bottom of the thread "FAQ219-2884"...
 
Worth while reading too.

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