?
Solved

SQL: Add 30 Days.

Posted on 2008-11-18
5
Medium Priority
?
424 Views
Last Modified: 2012-06-27
hello

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()?

Thanks
0
Comment
Question by:Ruttensoft
  • 2
3 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 2000 total points
ID: 22986655
DATEADD(DAY, 30, GETDATE())
0
 
LVL 3

Expert Comment

by:ajnt__
ID: 23262415
Or try this

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

Expert Comment

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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Screencast - Getting to Know the Pipeline
Suggested Courses
Course of the Month17 days, 12 hours left to enroll

830 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