【发布时间】:2015-10-03 11:32:30
【问题描述】:
我想获取当前小时和当天的时间戳。我该怎么做?
我将时间戳作为日期时间存储在我的数据库中,所以我想像这样比较我的数据:
- 当前小时插入了多少条记录
- 当天插入了多少条记录
感谢您的帮助
【问题讨论】:
-
使用 php
date函数date('h',strtotime('your_timestamp'))小时和date('d',strtotime('your_timestamp'))一天