如何从react到PostgreSQL的提取请求中获取数据库的准确日期

发布于 2025-02-13 11:58:22 字数 565 浏览 0 评论 0原文

我正在获取有关react应用程序的数据,该应用程序连接到a postgresql database  nbsp;当i  nbsp;当我在fet fetch请求上获取该日期字段的数据时从数据库中的日期开始,该日期就不知道为什么会发生这种情况。任何帮助将是最欢迎的,谢谢!

这就是我在发票列中得到的

这就是我在数据库中所拥有的 “这就是我在数据库中的“这是我在数据库中的内容”

通过此查询中的数据: -

"INSERT INTO  ordertable(invoicedate,invoicenumber,clientname) VALUES ($1, $2, $3) RETURNING order_id "

并通过此查询进行获取:

const getordertable = "SELECT * FROM ordertable ORDER BY order_id DESC ";

i am fetching data on an react application which is connected to a postgresql database  there's a date field in the table when I am getting the data Of that date field On fetch request it will have the previous date from the date I have there in the database  Don't know why is this happening . Any help will be most welcome ,Thanks in advance!

This is what i get in Invoicedate column
This is what i get in Invoicedate column

This is what I have in the database
This is what I have in the database

data in database going through this query:-

"INSERT INTO  ordertable(invoicedate,invoicenumber,clientname) VALUES ($1, $2, $3) RETURNING order_id "

And Fetching through this query :

const getordertable = "SELECT * FROM ordertable ORDER BY order_id DESC ";

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

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

发布评论

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