Solved

MySql Equivenlt of dbo.cart.Creation_Date > GETDATE() - 3

Posted on 2007-11-16
7
1,604 Views
Last Modified: 2008-02-21
Hi,

In SQL Server I can write a query which will return all records x amount of days from today date using the code below.

dbo.cart.Creation_Date > GETDATE() - 3

Is the an equivenlt in MySQL?
0
Comment
Question by:BenthamLtd
7 Comments
 
LVL 61

Expert Comment

by:mbizup
ID: 20302724
0
 

Author Comment

by:BenthamLtd
ID: 20302734
Hi,

I tried that, But I cant get it to do - 3 days
0
 
LVL 61

Accepted Solution

by:
mbizup earned 63 total points
ID: 20302792
Try using DateAdd instead of simply subtracting three days:

DATE_ADD(NOW(), INTERVAL -3 DAY)
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
LVL 25

Expert Comment

by:imitchie
ID: 20304029
dbo.cart.Creation_Date > DATESUB(NOW, INTERVAL 3 DAY)
0
 
LVL 25

Assisted Solution

by:imitchie
imitchie earned 62 total points
ID: 20304030
dbo.cart.Creation_Date > DATESUB(NOW(), INTERVAL 3 DAY)
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20953233
Forced accept.

Computer101
Community Support Moderator
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

Suggested Solutions

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

864 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

25 Experts available now in Live!

Get 1:1 Help Now