Solved

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

Posted on 2011-09-02
2
427 Views
Last Modified: 2012-05-12
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
Comment
Question by:matthewdacruz
2 Comments
 
LVL 11

Accepted Solution

by:
Goodangel Matope earned 500 total points
ID: 36473484
USE DATEDIFF('current_date', 'old_date')

AS shown below:

SELECT
DATEDIFF(curdate() , tracker.PP_dateDue) AS 'Days_Late'
FROM
tracker
0
 

Author Closing Comment

by:matthewdacruz
ID: 36473528
Thank you
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Read about achieving the basic levels of HRIS security in the workplace.
As technology users and professionals, we’re always learning. Our universal interest in advancing our knowledge of the trade is unmatched by most industries. It’s a curiosity that makes sense, given the climate of change. Within that, there lies a…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

773 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