PHP date_format() 函数

PHP 教程 · 2019-01-23 19:57:48

实例

返回一个新的 DateTime 对象,然后格式化日期:

<?php
$date=date_create("2013-03-15");
echo date_format($date,"Y/m/d H:i:s");
?>

定义和用法

date_format() 函数返回一个根据指定格式进行格式化的日期。

语法

date_format(object,format);

参数 描述
object 必需。规定一个由 date_create() 返回的 DateTime 对象。
format 必需。规定日期格式。

技术细节

返回值: 返回格式化的日期字符串。如果失败则返回 FALSE。
PHP 版本: 5.2+

点击查看所有 PHP 教程 文章: https://codercto.com/courses/l/5.html

查看所有标签

Programming Computer Vision with Python

Programming Computer Vision with Python

Jan Erik Solem / O'Reilly Media / 2012-6-22 / USD 39.99

If you want a basic understanding of computer vision's underlying theory and algorithms, this hands-on introduction is the ideal place to start. As a student, researcher, hacker, or enthusiast, you'll......一起来看看 《Programming Computer Vision with Python》 这本书的介绍吧!

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具