473,473 Members | 2,126 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

SQL Code for todays date -90 days

19 New Member
I have this code set up but I know the 3rd line is wrong. Could someone please help me on the code for pulling all entries for todays date -90 days? I would really appreciate it and thanks for helping.

SELECT *
from view1_4t
where DOB_ = (getdate()-90)
GO
May 16 '07 #1
2 29742
sandyboy
16 New Member
I have this code set up but I know the 3rd line is wrong. Could someone please help me on the code for pulling all entries for todays date -90 days? I would really appreciate it and thanks for helping.

SELECT *
from view1_4t
where DOB_ = (getdate()-90)
GO

Try this code

Select * from view1_4t where dob=dateadd(dd,-90,getdate())
May 17 '07 #2
MMcCarthy
14,534 Recognized Expert Moderator MVP
You have posted this question in the Articles section. I am moving it to the SQL Server forum.

ADMIN
May 19 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Rainmaker | last post by:
Greetings, I have not been able to find the documentation that will allow me to insert php code inside the html code in the $message block in the mail() function. Using the example in the help...
5
by: DangerD321 | last post by:
Hi me again, last problem this time thoough! :¬) One table of my database is called Loans, and the fields in question here are Return Date and Days Late. Basically, what I want is the days late...
2
by: Chuck | last post by:
Using a macro to output a query to an Excel file. Is there a way to automatically add todays date in the file spec? As: C:\Access Data\ & todays date.xls Chuck ....
5
by: Vayse | last post by:
In VB6, I would have used Date() That no longer works. How do I find todays date in VB.net?
2
by: Drum2001 | last post by:
Hello, I am having isues with the following: I have two forms, a MAIN FORM with a SUB FORM: Within the MAIN FORM, I have an unbound textbox (Date Format) and a command button. Onload, the...
1
by: Mark12345 | last post by:
Hi all before I begin to tell you my problems just a big thanks to Mary McCarthy who helped me lots. Thank You Mary!!! Right todays problems are Getting the date in my form automatically. (read...
2
by: Luqman | last post by:
Hi, Any Idea how to Display Todays Date in DetailView Template Field while Inserting ? For example: When I click on New Button of DetailView Control, I need to display Today's Date in a...
3
by: jonosborne | last post by:
Hi guys, im a bit of a novice being thrown in at the deep end ! Using MS Access 97 i have a table with data that is updated once a day from an Excel spreadsheet. I need a way of identifying when data...
1
by: geethaandyou | last post by:
I Need A C Program To Find The Date That Comes After N Days From Todays Date
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.