插入从凹槽到DB2的电流时间戳

发布于 2025-01-31 21:30:01 字数 134 浏览 3 评论 0原文

DB2具有Current_Timestamp函数,该函数以这种格式返回当前时间戳:2022-05-24-11:22:13.022543

是否等于Groovy中的Current_timestamp?如何存储从Groovy到DB2的当前时间戳?

DB2 has CURRENT_TIMESTAMP function that returns current timestamp in this format: 2022-05-24-11:22:13.022543

Is there equivalent to CURRENT_TIMESTAMP in groovy? How to store current timestamp from groovy to DB2?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

极致的悲 2025-02-07 21:30:01

您可以设置Timestamp 导入Java.sql.timestamp;还将数据库列设置为时间戳。

stmt.setTimestamp(1, new Timestamp(System.currentTimeMillis()));

You can set Timestamp import java.sql.Timestamp; Also set your database column as Timestamp.

stmt.setTimestamp(1, new Timestamp(System.currentTimeMillis()));
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文