如何在Firebird中从Unix时间转换为DateTime?
Firebird是否有类似于MySQL的Frof_unixTime
将UNIX时间转换为DateTime的功能?
Does Firebird have something similar to MySQL's FROM_UNIXTIME
function for converting Unix time to datetime?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在火鸟中没有单独的内置功能。解决方案是使用
dateadd
针对时期:或
例如:
重要的警告:结果是
timestamp
,它没有时区。解释因平台而异(例如Java将在当前的JVM时区中解释它)。在Firebird 4.0中,您可以通过使用Timestamp'1970-01-01 00:00:00 utc'
而改用timestamp,将其作为
Timestamp
在UTC上进行。There is no separate built-in function to do this in Firebird. The solution is to use
DATEADD
against the epoch:or
For example:
Important caveat: the result is a
TIMESTAMP
, which is without timezone. Interpretation varies by platform (e.g. Java will interpret it in the current JVM timezone). In Firebird 4.0, you can make it aTIMESTAMP WITH TIME ZONE
at UTC by usingtimestamp '1970-01-01 00:00:00 UTC'
instead.