Friday, March 30, 2012

Increase one month

Hi,
I have a date value of 4/1/2005, I wanted to increase just one month
to 5/1/2005. I have millions of records like that to increase just one
month. Is there a function I can use?
Thanks a lot!!
MichaelTry with dateadd(mm,1, datecolumn)
MC
"Michael" <michaelnx@.gmail.com> wrote in message
news:1178048676.991639.192910@.n76g2000hsh.googlegroups.com...
> Hi,
> I have a date value of 4/1/2005, I wanted to increase just one month
> to 5/1/2005. I have millions of records like that to increase just one
> month. Is there a function I can use?
> Thanks a lot!!
> Michael
>|||"Michael" <michaelnx@.gmail.com> wrote in message
news:1178048676.991639.192910@.n76g2000hsh.googlegroups.com...
> Hi,
> I have a date value of 4/1/2005, I wanted to increase just one month
> to 5/1/2005. I have millions of records like that to increase just one
> month. Is there a function I can use?
> Thanks a lot!!
> Michael
>
Lookup the DATEADD function in Books Online.
You will find that you can get more detailed and useful answers if you
supply more information. Read my signature.
--
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||On May 1, 3:58 pm, "David Portas"
<REMOVE_BEFORE_REPLYING_dpor...@.acm.org> wrote:
> "Michael" <michae...@.gmail.com> wrote in message
> news:1178048676.991639.192910@.n76g2000hsh.googlegroups.com...
> > Hi,
> > I have a date value of 4/1/2005, I wanted to increase just one month
> > to 5/1/2005. I have millions of records like that to increase just one
> > month. Is there a function I can use?
> > Thanks a lot!!
> > Michael
> Lookup the DATEADD function in Books Online.
> You will find that you can get more detailed and useful answers if you
> supply more information. Read my signature.
> --
> David Portas, SQL Server MVP
> Whenever possible please post enough code to reproduce your problem.
> Including CREATE TABLE and INSERT statements usually helps.
> State what version of SQL Server you are using and specify the content
> of any error messages.
> SQL Server Books Online:http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
> --
thanks a lot all!!!

No comments:

Post a Comment