如何在mysql中将datetime转换为bigint? [英] How to convert datetime into bigint in mysql?
本文介绍了如何在mysql中将datetime转换为bigint?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
I have bigint(10) datatype column in table, for that have to store current datetime value. How can i convert the current datetime into bigint in mysql?.Please suggest your solution.
我尝试过:
i在谷歌尝试过。但没有得到确切的解决方案
What I have tried:
i tried in google. But didn't get exact solution
推荐答案
使用FROM_UNIXTIME
函数 - MySQL :: MySQL 5.5参考手册:: 12。7日期和时间函数 - FROM_UNIXTIME [ ^ ]
另一种方式...... MySQL :: MySQL 5.5参考手册:: 12。7日期和时间函数UNIX_TIMESTAMP [ ^ ]
Use theFROM_UNIXTIME
function - MySQL :: MySQL 5.5 Reference Manual :: 12.7 Date and Time Functions - FROM_UNIXTIME[^]
And the other way ... MySQL :: MySQL 5.5 Reference Manual :: 12.7 Date and Time Functions UNIX_TIMESTAMP[^]
这篇关于如何在mysql中将datetime转换为bigint?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文