跳转至

Extract offset from legacy OffsetDateTime(从旧版 OffsetDateTime 中提取偏移量)

Supported in: Batch

Extracts the offset from a legacy OffsetDateTime column. This is the offset in seconds of the origin timezone of the timestamp from UTC timezone.

Expression categories: Datetime

Declared arguments

  • Expression: The legacy OffsetDateTime column.
    Expression\>

Output type: Integer

Examples

Example 1: Base case

Argument values:

  • Expression: col_a
col_a Output
{
offset: 0,
timestamp: 2024-09-09T09:00:00.001Z,
}
0
{
offset: 19800,
timestamp: 2024-09-09T09:00:00.001Z,
}
19800
{
offset: -3600,
timestamp: 2024-09-09T09:00:00.001Z,
}
-3600

Example 2: Null case

Argument values:

  • Expression: col_a
col_a Output
null null
{
offset: 19800,
timestamp: null,
}
19800
{
offset: null,
timestamp: 2024-09-09T09:00:00.001Z,
}
0


中文翻译


从旧版 OffsetDateTime 中提取偏移量

支持:批处理(Batch)

从旧版 OffsetDateTime 列中提取偏移量。该偏移量表示时间戳的原始时区相对于 UTC 时区的偏移秒数。

表达式类别: 日期时间(Datetime)

声明的参数

  • 表达式(Expression): 旧版 OffsetDateTime 列。
    Expression\>

输出类型: Integer

示例

示例 1:基本情况

参数值:

  • 表达式: col_a
col_a 输出
{
offset: 0,
timestamp: 2024-09-09T09:00:00.001Z,
}
0
{
offset: 19800,
timestamp: 2024-09-09T09:00:00.001Z,
}
19800
{
offset: -3600,
timestamp: 2024-09-09T09:00:00.001Z,
}
-3600

示例 2:空值情况

参数值:

  • 表达式: col_a
col_a 输出
null null
{
offset: 19800,
timestamp: null,
}
19800
{
offset: null,
timestamp: 2024-09-09T09:00:00.001Z,
}
0