gpt4 book ai didi

MYSQL 日期时间 : using slashes instead of of dahses

转载 作者:行者123 更新时间:2023-11-29 08:13:47 27 4
gpt4 key购买 nike

快速提问。在 MYSQL 表的 DATETIME 列中,格式为 YYYY-MM-DD。所以如果我插入今天的日期,如2014-01-09,MYSQL会理解...但是如果我像这样插入数据它会理解吗?

YYYY/MM/DD 或 2014/01/09

最佳答案

来自the manual :

MySQL permits a “relaxed” format for values specified as strings, in which any punctuation character may be used as the delimiter between date parts or time parts.

看来答案是肯定的。

关于MYSQL 日期时间 : using slashes instead of of dahses,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21030873/

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