Home >Database >Mysql Tutorial >mysql计算生日算法_MySQL

mysql计算生日算法_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-01 13:29:191447browse

bitsCN.com

mysql计算生日算法

 

1year( from_days( datediff( now( ), birthdate)))now() 当前时间,精确到秒datediff(begindate,enddate):返回两日期之间相关的日数.from_days(days):从0000-00-00开始,根据传入的日数,返回一个日期;year(date):获取日期上的年.

 


bitsCN.com
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn