如何通过首先在PostgreSql&#x2B中转换来比较表列。 typeorm

发布于 2025-02-09 05:18:15 字数 434 浏览 1 评论 0原文

我是后端技术的初学者,我正在开发一个查询typeorm QueryBuilder + PostgreSQL。

我的查询看起来像这样:

”

但我无法将时间戳转换为以下格式。任何具有专业知识的人都可以帮助我以特定格式选择所有记录。

从过去的两天开始,我正在遭受这件事,但仍然找不到任何解决方案。实际上,我想在子句中比较此日期格式。因此,我想首先选择该日期格式,然后我可以使用相同的方法将列与当前日期和以前的日期进行比较。

I am beginner in Backend technology and I am developing one query in Typeorm QueryBuilder + PostgreSQL.

My query is look like this :

YYYY-MM-DD

But I can't convert my timestamp into following format. Can anyone who has expertise in it, please help me to select all records with timestamp in specific format.

I am suffering this things from last two days but still not find any solution. Actually I want to compare this date format in having clause. so I want to first select that date format then I can use that same method to compare column with current date and previous dates.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文