• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 444
  • Last Modified:

How do you get days when subtracting a date column from the current date in mysl

Hi

How do you getthe days value when you subtract a date from the curdate()?
SELECT
(curdate() - tracker.PP_dateDue) AS 'Days_Late'
FROM
tracker
0
matthewdacruz
Asked:
matthewdacruz
1 Solution
 
Goodangel MatopeSoftware ArchitectCommented:
USE DATEDIFF('current_date', 'old_date')

AS shown below:

SELECT
DATEDIFF(curdate() , tracker.PP_dateDue) AS 'Days_Late'
FROM
tracker
0
 
matthewdacruzAuthor Commented:
Thank you
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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