How-to | Truncate a date #
Another useful date processor introduced in Dataiku 9 is the Truncate date processor, which truncates a date based on a given date part. This can be useful to remove the date parts that we don’t need, for example to easily compute the first or last date of a given period.
-
Click + Add a New Step and select Dates > Truncate date at a specific value .
-
In the Column field of the recipe step, select the date column that you wish to truncate.
-
From the Date part dropdown, select your preferred date part (in the example below, we select Month ).
-
In the Output column field, type the name of the column you wish to store the truncated date value in (in this example, we choose to store it in a new column named review_month ).
