双11狂欢大促

盲盒赢 定制羽绒服

开启惊喜盲盒,抽取你的专属好礼

— 惊喜奖品抢先看 —

postgresql 按创建日期范围查询

昆山一百计算机有限公司 昆山一百计算机有限公司 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

DTCloud  postgresql 按创建日期范围查询

方法一:

select * from res_users where create_date >= '2022-01-01' and create_date < '2022-07-01';

方法二:为啥字符串可以按日期格式比较大小

select * from user_info where create_date res_users '2022-01-01' and '2022-07-01';

方法三:

select * from res_users where create_date >= '2022-01-01'::timestamp and create_date < '2022-07-01'::timestamp;

方法四:

select * from user_info where create_date res_users to_date('2022-01-01','YYYY-MM-DD') and to_date('2022-07-01','YYYY-MM-DD');

创建下载记录

self._cr.execute("INSERT INTO documents_download(document_id, user_id, create_date)VALUES (%s, %s,now())", (obj.document_id.id,int(kw[0]['uid'])))

 

...全文

相关推荐

评论
收藏 已收藏
分享
返回顶部