Zend_Date 两个日期时间 mysql 值相减
我正在构建一个小型应用程序来计算员工出勤率。
用户将签入,他的签入时间将以 mysql 日期时间格式记录,例如
check_in_time 2011-12-16 20:27:20
当他签出时,
check_out_time 2011-12-16 20:27:27
我可以通过爆炸和减法以传统方式完成,但我确信 Zend_Date 有更有效的方法做它。
i am building a small application to calculate employee attendance.
A user will check in, his check in time will be recorded in a mysql datetime format, for example
check_in_time 2011-12-16 20:27:20
And when he checks out
check_out_time 2011-12-16 20:27:27
I can do it the conventional way by exploding and doing the subtraction, but am sure Zend_Date has a more efficient way of doing it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
显然我的问题并不难回答,无论如何,这是获得以秒为单位的时间差异的答案,然后我可以正常处理秒。
感谢@ajreal 的文档,我没有正确地研究它们。
Obviously my question was not hard to answer, anyhow this is the answer to get the time diff in seconds, then i can handle seconds normally.
Thanks for the docs @ajreal, i did not look correctly into them.