Funzione to_timestamp_ltz

Si applica a:segno di spunta sì Databricks SQL segno di spunta sì Databricks Runtime

Ritorni expr inviati a un timestamp con un fuso orario locale usando formattazione opzionale.

Syntax

to_timestamp_ltz(expr [, fmt] )

Arguments

  • expr: Una STRING, DATE, TIMESTAMP, o un'espressione numerica che rappresenta un timestamp.
  • fmt: un'espressione di formato STRING opzionale.

Returns

Un oggetto TIMESTAMP_LTZ.

Se si omette fmt, la funzione è sinonimo di cast(expr AS TIMESTAMP_LTZ).

Se fmt è malformato o non produce un timestamp ben formato, Azure Databricks genera un errore.

Condizioni di errore comuni

Examples

> SELECT to_timestamp_ltz('2016-12-31 00:12:00');
  2016-12-31 00:12:00

> SELECT to_timestamp_ltz('2016-12-31', 'yyyy-MM-dd');
  2016-12-31 00:00:00