gpt4 book ai didi

mysql - Sql 将时间戳与正常日期进行比较

转载 作者:行者123 更新时间:2023-11-29 23:46:27 26 4
gpt4 key购买 nike

如何将时间戳日期与正常日期进行比较SQL:

select * from mg_customers_conversation where timecreated>='2014-09-09'

与时间戳相比,这会给我 0 值

注意:列 timecreated 是一个时间戳

栏目创建时间 2012-12-01 00:00:00

谁能解释一下如何使用 SQL 中的 Date_format,STR_TO_DATE 方法来执行此操作

最佳答案

这会起作用

select * from mg_customers_conversation where DATE_FORMAT(timecreated,'%Y-%m-%d')>='2014-09-09'

关于mysql - Sql 将时间戳与正常日期进行比较,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25910123/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com