Solved

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

Posted on 2007-11-16
7
1,614 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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

PL/SQL can be a very powerful tool for working directly with database tables. Being able to loop will allow you to perform more complex operations, but can be a little tricky to write correctly. This article will provide examples of basic loops alon…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

732 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