nowWithDelta

返回包含偏移量的当前日期时间。 如果指定了时区ID,则会应用时区偏移。 有关数据类型的更多信息,请参阅 此页面.

类别

日期

函数语法

nowWithDelta(<parameters>)

参数

参数 描述
delta 正整数或负整数
日期部分 年、月、日、小时、分钟或秒作为字符串
时区id 时区值的字符串表示形式。 有关更多信息,请参阅 数据类型. 时区ID必须是字符串常量。 它不能是字段引用或表达式。

签名和返回类型

nowWithDelta(<delta>,<date part>

nowWithDelta(<delta>,<date part>,"<timeZone id>")

返回日期时间。

示例

nowWithDelta(-2, "hours")

nowWithDelta(-2, "hours", "Europe/Paris")

返回2小时前的dateTime。

在此页面上