Share via


Functions.UnixTimestamp Method

Definition

Overloads

UnixTimestamp()

Returns the current Unix timestamp (in seconds).

UnixTimestamp(Column)

Converts time string in format yyyy-MM-dd HH:mm:ss to Unix timestamp (in seconds), using the default timezone and the default locale.

UnixTimestamp(Column, String)

Converts time string with given format to Unix timestamp (in seconds).

UnixTimestamp()

Returns the current Unix timestamp (in seconds).

public static Microsoft.Spark.Sql.Column UnixTimestamp ();
static member UnixTimestamp : unit -> Microsoft.Spark.Sql.Column
Public Shared Function UnixTimestamp () As Column

Returns

Column object

Remarks

All calls of `UnixTimestamp` within the same query return the same value (i.e. the current timestamp is calculated at the start of query evaluation).

Applies to

UnixTimestamp(Column)

Converts time string in format yyyy-MM-dd HH:mm:ss to Unix timestamp (in seconds), using the default timezone and the default locale.

public static Microsoft.Spark.Sql.Column UnixTimestamp (Microsoft.Spark.Sql.Column column);
static member UnixTimestamp : Microsoft.Spark.Sql.Column -> Microsoft.Spark.Sql.Column
Public Shared Function UnixTimestamp (column As Column) As Column

Parameters

column
Column

Column to apply

Returns

Column object

Applies to

UnixTimestamp(Column, String)

Converts time string with given format to Unix timestamp (in seconds).

public static Microsoft.Spark.Sql.Column UnixTimestamp (Microsoft.Spark.Sql.Column column, string format);
static member UnixTimestamp : Microsoft.Spark.Sql.Column * string -> Microsoft.Spark.Sql.Column
Public Shared Function UnixTimestamp (column As Column, format As String) As Column

Parameters

column
Column

Column to apply

format
String

Date format

Returns

Column object

Remarks

Supported date format can be found: http://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html

Applies to