Request some assistance. I’m applying a calculated field to the last column (DTECALC) using the following statement to find the difference between two dates; a selected date and the current date.
SELECT DATE - CURDATE()
FROM LINKS
WHERE ID='%ID%’Â
The result seems to be working, except when it jumps to the next month the result is largely inaccurate. Does anyone know if we need to set the data type to particular value or am I missing an additional value in the SQL statement? Thank you for your assist.
V/r,
DATE DIFF BETWEEN SELECTED DATE & CURDATE()
-
- Veteran Member
- Posts: 32
- Joined: 2020-06-22 00:00
DATE DIFF BETWEEN SELECTED DATE & CURDATE()
- Attachments
-
- Sample Form
- Sample Form.jpg (71.94 KiB) Viewed 1626 times
-
- Veteran Member
- Posts: 32
- Joined: 2020-06-22 00:00
Re: DATE DIFF BETWEEN SELECTED DATE & CURDATE()
Found the answer for those that are interested!
SELECT DATEDIFF(date,curdate())
FROM links
WHERE id='%ID%'
SELECT DATEDIFF(date,curdate())
FROM links
WHERE id='%ID%'
Re: DATE DIFF BETWEEN SELECTED DATE & CURDATE()
Thanks a lot, It worked for me in a similar situation.