Solved

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

Posted on 2007-11-16
7
1,615 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Webinar: Deploying MySQL in production 6/22 11am

Join Percona’s Senior Operations Engineer, Daniel Kowalewski as he presents Deploying MySQL in production on Thursday, June 22, 2017 at 11:00 am PDT / 2:00 pm EDT (UTC-7).

 
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

Is Your DevOps Pipeline Leaking?

Is your CI/CD pipeline a hodge-podge of randomly connected tools? You’ve likely got a tool to fix one problem & then a different tool to fix another, resulting in a cluster of tools with overlapping functionality. Learn how to optimize your pipeline with Gartner's recommendations

Question has a verified solution.

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

This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read on. . .
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

728 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