DATEDIFF (can you use number of days)

I need to work out a date difference between a mysql date and days value from another colum

I have a date in a column called rDate on a table called references and on another table called tblsolicitor i have a colum called paymentterms.

I want to see the days difference between the rDate and how many days they have in their payment terms.

What would the best way to do this?

I am coding in PHP / mysql.

could you help us out just a wee bit and do a SHOW CREATE TABLE for each table

Use DATEDIFF(date1, date2) to calculate the difference in days between two date portions.

Can you simply ADD the ‘payment terms’ (which I assume is an integer) to the rDate and test to see if it is before tomorrow?

Or have I misunderstood your problem?

If you want to add days to a date, use: DATE_ADD

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.