Convert between time units

Supported in: Batch, Streaming

Expression categories: Datetime

Declared arguments

  • Amount of current unit - no description
    Expression<DefiniteNumeric>
  • Current unit - The unit prior to conversion.
    Enum<Days, Hours, Milliseconds, Minutes, Seconds, Weeks>
  • Target unit - The desired unit after conversion.
    Enum<Days, Hours, Milliseconds, Minutes, Seconds, Weeks>

Output type: Double

Examples

Example 1: Base case

Argument values:

  • Amount of current unit: days
  • Current unit: days
  • Target unit: minutes
daysOutput
1217280.0

Example 2: Null case

Argument values:

  • Amount of current unit: days
  • Current unit: days
  • Target unit: minutes
daysOutput
nullnull