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

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?
BenthamLtdAsked:
Who is Participating?
 
mbizupCommented:
Try using DateAdd instead of simply subtracting three days:

DATE_ADD(NOW(), INTERVAL -3 DAY)
0
 
mbizupCommented:
0
 
BenthamLtdAuthor Commented:
Hi,

I tried that, But I cant get it to do - 3 days
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
imitchieCommented:
dbo.cart.Creation_Date > DATESUB(NOW, INTERVAL 3 DAY)
0
 
imitchieCommented:
dbo.cart.Creation_Date > DATESUB(NOW(), INTERVAL 3 DAY)
0
 
Computer101Commented:
Forced accept.

Computer101
Community Support Moderator
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.