I want to add two business days to a date that I have. I
have DateAdd(dd,2,Orders.DeliverDate) already working,
but I want it to only add 2 business days.
In other words if 01/25/2004 falls on a friday, then I
want it to return 0129/2004.
TIA,
VicYou'll need a calendar table that contains all valid business days.
Otherwise, you won't be able to account for holidays.
"Vic" <vduran@.specpro-inc.com> wrote in message
news:18aca01c42331$514c2190$a001280a@.phx.gbl...
> I want to add two business days to a date that I have. I
> have DateAdd(dd,2,Orders.DeliverDate) already working,
> but I want it to only add 2 business days.
> In other words if 01/25/2004 falls on a friday, then I
> want it to return 0129/2004.
> TIA,
> Vic|||http://www.aspfaq.com/2519
http://www.aspfaq.com/2453
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Vic" <vduran@.specpro-inc.com> wrote in message
news:18aca01c42331$514c2190$a001280a@.phx.gbl...
>I want to add two business days to a date that I have. I
> have DateAdd(dd,2,Orders.DeliverDate) already working,
> but I want it to only add 2 business days.
> In other words if 01/25/2004 falls on a friday, then I
> want it to return 0129/2004.
> TIA,
> Vic|||What about just weekends?
>--Original Message--
>You'll need a calendar table that contains all valid
business days.
>Otherwise, you won't be able to account for holidays.
>"Vic" <vduran@.specpro-inc.com> wrote in message
>news:18aca01c42331$514c2190$a001280a@.phx.gbl...
>> I want to add two business days to a date that I
have. I
>> have DateAdd(dd,2,Orders.DeliverDate) already working,
>> but I want it to only add 2 business days.
>> In other words if 01/25/2004 falls on a friday, then I
>> want it to return 0129/2004.
>> TIA,
>> Vic
>
>.
>|||A calendar table still better because you set it up once, and your
individual queries don't have to worry about what day of the week is today,
what days of the week are weekends, etc.
Please see the links I posted.
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
<anonymous@.discussions.microsoft.com> wrote in message
news:1d38901c42334$b8d40230$a501280a@.phx.gbl...
> What about just weekends?
>
>>--Original Message--
>>You'll need a calendar table that contains all valid
> business days.
>>Otherwise, you won't be able to account for holidays.
>>"Vic" <vduran@.specpro-inc.com> wrote in message
>>news:18aca01c42331$514c2190$a001280a@.phx.gbl...
>> I want to add two business days to a date that I
> have. I
>> have DateAdd(dd,2,Orders.DeliverDate) already working,
>> but I want it to only add 2 business days.
>> In other words if 01/25/2004 falls on a friday, then I
>> want it to return 0129/2004.
>> TIA,
>> Vic
>>
>>.
No comments:
Post a Comment