gpt4 book ai didi

datetime - 具有偏移量的SQLite格式日期时间

转载 作者:行者123 更新时间:2023-12-03 17:45:36 24 4
gpt4 key购买 nike

我只想从sqlite3中的datetime列返回日期。问题是我必须要补偿它。该列称为ClientCreatedDate,值是2011-10-24 20:53:15 +0000

通常,如果值看起来像这样的2011-10-24 20:53:15,我将这样做:

Select strftime('%Y-%m-%d', ClientCreatedDate) as convertedDate From Sl_Task


一切都会很好。

有了补偿后,我能做些什么?

2011-10-24 20:53:15 +0000

最佳答案

怎么样使用子串

Select strftime('%Y-%m-%d', substr(ClientCreatedDate,1,19) as ....

关于datetime - 具有偏移量的SQLite格式日期时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7949284/

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