How to get data one year before from database in mysql

How to get data one year before from database in mysql?

by Lalita

0 3198

Answer: To select all records one year ago from today, First of all you have to get the current date for comparing the year.

SELECT * FROM users WHERE join_date <= DATE_SUB(NOW(),INTERVAL 1 YEAR);



Best WordPress Hosting


Share:

SSL for business, from $12.88


Leave a Reply


Comments
    Waiting for your comments

Coding Tag WhatsApp Chat
Coding Tag WhatsApp Chat