In MYSQL DB I need to check if a “datetime” field is more than 24hours (or whatever) ago in which case delete the row.
How to add hours to datetime in mysql?
thanks
Luca
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
What about something like this :
With :
now(): the current date timedate_sub()to substract 1 day to that dateOr, if you want o use 24 hours instead of 1 day :