Tsql

  • DATEADD(d,-30,GETDATE())..please explain me the parameters of this sql date function...wat will it return

  • Have you tried looking it up on BOL?

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • shanila_minnu (5/22/2009)


    DATEADD(d,-30,GETDATE())..please explain me the parameters of this sql date function...wat will it return

    Simple, minus 30 days from today! - exactly!

    ============================================================
    SELECT YOUR PROBLEM FROM SSC.com WHERE PROBLEM DESCRIPTION =
    http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]

  • It will change according the month days, couz some months has 30 days and some of them 31, even February has 28 or 29 so the differences can be little bit different but in this case 22/05/2009 - 30 days = 22-04/2009!

    Everything seems clear!

    :hehe:

    ============================================================
    SELECT YOUR PROBLEM FROM SSC.com WHERE PROBLEM DESCRIPTION =
    http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply