Tuesday, March 27, 2012

Consistant dates for use in querys

I want to make some UDF()s to preset dates for a slew of reports that I need
to do.
In SQL Server I'm missing the mark in date math. I need to get a few basic
dates and I'll roll with the others
StartofLastMonth
EndofLastMonth
StartofLastW
EndofLastW
StartofCurrentMonth
EndofCurrentMonth
YesterdayWithWends
Is there any way to detect a holiday and know that business is closed? We
B2B with banks so we will be closed on Columbus Day! How can my
Yesterday... know that on Oct 11th it should really use Oct 7?
TIA
__StephenStephen,
Check out Aaron's page:
http://www.aspfaq.com/show.asp?id=2519
HTH
Jerry
"Stephen Russell" <srussell@.transactiongraphics.com> wrote in message
news:ufmEpv1yFHA.2516@.TK2MSFTNGP12.phx.gbl...
>I want to make some UDF()s to preset dates for a slew of reports that I
>need to do.
> In SQL Server I'm missing the mark in date math. I need to get a few
> basic dates and I'll roll with the others
> StartofLastMonth
> EndofLastMonth
> StartofLastW
> EndofLastW
> StartofCurrentMonth
> EndofCurrentMonth
> YesterdayWithWends
> Is there any way to detect a holiday and know that business is closed? We
> B2B with banks so we will be closed on Columbus Day! How can my
> Yesterday... know that on Oct 11th it should really use Oct 7?
> TIA
> __Stephen
>

No comments:

Post a Comment