[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1618
  • Last Modified:

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?
0
BenthamLtd
Asked:
BenthamLtd
2 Solutions
 
mbizupCommented:
0
 
BenthamLtdAuthor Commented:
Hi,

I tried that, But I cant get it to do - 3 days
0
 
mbizupCommented:
Try using DateAdd instead of simply subtracting three days:

DATE_ADD(NOW(), INTERVAL -3 DAY)
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now