4

mysql 数据库存日期一般用什么类型?

 2 years ago
source link: https://www.v2ex.com/t/865869
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

V2EX  ›  MySQL

mysql 数据库存日期一般用什么类型?

  Ufo666 · 11 小时 28 分钟前 · 1526 次点击

我之前用的 date ,但是在做日期减法,或者前端传来的范围时间查找,总是要去转换成时间戳,然后再转换成 date 类型,然后才能查询,所以我在想能不能直接存 int 类型的时间戳会比较好。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK