SQL: Add 30 Days.

Posted on 2008-11-18
Last Modified: 2012-06-27

I am using VB.NET and SQL. I want to have a WHERE, where I can use Today + 30 Days.

until now I have:

Tbl_Back_End > GETDATE()

how can I add 30 days to GETDATE()?

Question by:Ruttensoft
    LVL 142

    Accepted Solution

    LVL 3

    Expert Comment

    Or try this

    WHERE Tbl_Back_End > DateAdd("d", 30, GETDATE())
    LVL 142

    Expert Comment

    by:Guy Hengel [angelIII / a3]
    the "d" syntax would be for ms access, and NOW() instead of GETDATE().
    for ms sql server, it would be  like I suggested initially.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
    The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now