mardi 19 juillet 2016

mysql compare 2 dates

I'm absolute noob in Java and Mysql. Have an assignment to make where user need to login and register. All code been done. But there is one little part where the user's login should expire in 6 month. I'm trying to accomplish it by using SELECT DATEDIFF(month,'2014-06-05','2014-08-05') AS DiffDate. I can track user's registry date but with the second date I'm a bit stumped. How can I track the current time of user login. Any suggestions. Thank you.

Aucun commentaire:

Enregistrer un commentaire