| Author |
Topic |
|
Trudye
Posting Yak Master
169 Posts |
Posted - 2008-08-22 : 06:11:55
|
| Does anyone have a date rtn that calcs the next processing date, taking into account holidays? I used to have one written in VB but lost it.Thanx,Trudye |
|
|
RyanRandall
Master Smack Fu Yak Hacker
1074 Posts |
Posted - 2008-08-22 : 06:59:18
|
| Perhaps I'm missing something. What's your definition of 'next processing date' and 'holiday'?Ryan Randall Solutions are easy. Understanding the problem, now, that's the hard part. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-22 : 07:31:46
|
| Are you looking for next business day? |
 |
|
|
Trudye
Posting Yak Master
169 Posts |
Posted - 2008-08-22 : 08:35:13
|
| sorry about that, yes that's exactly what I'm looking for Next Business day. |
 |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2008-08-22 : 09:38:51
|
| [code]declare @start_date datetimedeclare @end_date datetimeselect @start_date = getdate()+1select @end_date = @start_date+7select NEXT_WEEKDAY_DATE = min(a.[DATE])from -- Date Table Function F_TABLE_DATE -- http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=61519 dbo.F_TABLE_DATE ( @start_date, @end_date) awhere a.[DAY_OF_WEEK] between 2 and 6 and a.[DATE] not in ( Select b.Holiday from MyHolidayTable a )[/code]CODO ERGO SUM |
 |
|
|
Trudye
Posting Yak Master
169 Posts |
Posted - 2008-08-22 : 11:34:32
|
| Thank you so very much Michael. |
 |
|
|
Trudye
Posting Yak Master
169 Posts |
Posted - 2008-08-22 : 21:47:59
|
| I have a not to bright question, what does this statement mean, what does the N mean? |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2008-08-22 : 22:27:06
|
quote: Originally posted by Trudye I have a not to bright question, what does this statement mean, what does the N mean?
What statement ? What N ? KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-08-23 : 06:32:26
|
quote: Originally posted by Trudye I have a not to bright question, what does this statement mean, what does the N mean?
http://support.microsoft.com/kb/239530MadhivananFailing to plan is Planning to fail |
 |
|
|
|