Functions.Trunc(Column, String) Method

Definition

Returns date truncated to the unit specified by the format.

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

Parameters

column
Column

Column to apply

format
String

'year', 'yyyy', 'yy' for truncate by year, or 'month', 'mon', 'mm' for truncate by month

Returns

Column object

Applies to