Home  >  Article  >  Database  >  How to use the TO_DAYS function in MySQL

How to use the TO_DAYS function in MySQL

WBOY
WBOYforward
2023-05-28 14:10:061303browse

TO_DAYS(date)

SELECT TO_DAYS(‘2016-01-16') 
SELECT TO_DAYS(‘20160116') 
SELECT TO_DAYS(‘160116')
-> 736344
-> 736344
-> 736344

Returns the total number of days from year 0 to date

The above is the detailed content of How to use the TO_DAYS function in MySQL. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete