Home > Database > Mysql Tutorial > mysql to_days函数用法实例

mysql to_days函数用法实例

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 09:57:18
Original
1691 people have browsed it

TO_DAYS(date)

给定一个日期date,返回一个天数 (从年份0开始的天数)。MySQL“日期和时间类型”中的规则将日期中的二位数年份值转化为四位。例如,‘1997-10-07′和 ‘97-10-07′ 被视为同样的日期;对于1582 年之前的日期(或许在其它地区为下一年 ), 该函数的结果实不可靠的。

实例:

<code class="language-sql">SELECT TO_DAYS(  '2015-10-31' )</code>
Copy after login

得到的值:736267

Related labels:
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template