Dates functions
In the case that your data is not detected as date, you need to first apply the Convert to date function to the column with dates before applying any other date-related function. The format information that you need to fill is just to configure the display text format of the date, not to parse a text not detected as date.
Add duration
Adds duration to a date, time, or timestamp, in the specified time unit.
Properties
Property | Configuration |
---|---|
Columns to process |
Select the column or columns on which you want to apply the function. If you want to apply it on more than one column, use the drop-down list to select which columns, and click Apply. |
Time unit |
Select which part of the date, time, or timestamp you want to add time to:
|
Use with |
|
Create new column | Select this check box if you want to output the result of this function in a new column and keep the original untouched. |
Example
Input | Configuration | Output |
---|---|---|
03/03/2023 |
|
03/03/2033 |
3/7/2019 2:00:00 PM |
|
3/7/2019 2:00:30 PM |
Calculate date difference
For a given time part unit, calculates the time between the dates in your column and the date of your choice.
The calculation is done by first truncating the dates to the specified date or time part, and then returning the difference between them as an integer.
Properties
Property | Configuration |
---|---|
Columns to process |
Select the column or columns on which you want to apply the function. If you want to apply it on more than one column, use the drop-down list to select which columns, and click Apply. |
Time unit |
Select the time part to use for the calculation:
|
Until |
Select how you want to set the date to target:
|
Create new column | Select this check box if you want to output the result of this function in a new column and keep the original untouched. |
Example
Input | Configuration | Output |
---|---|---|
06/12/1989 |
|
4044 |
|
|
468 |
Compare dates
Compares the dates in the column with a specific value, or values from another column. The function will return TRUE if the condition set by the operator is met, otherwise it will return FALSE.
Times can only be compared with times but timestamps and dates can be compared. In this case, a date will be interpreted as a timestamp with time set to 00:00.
Properties
Property | Configuration |
---|---|
Columns to process |
Select the column or columns on which you want to apply the function. If you want to apply it on more than one column, use the drop-down list to select which columns, and click Apply. |
Compare mode |
Select the operator that will be used to compare the dates.
|
Use with |
|
Create new column | Select this check box if you want to output the result of this function in a new column and keep the original untouched. |
Example
Input | Configuration | Output |
---|---|---|
|
|
|
Convert to date
Converts the type of data contained in the column so that it is interpreted as dates in the system.
Properties
Property | Configuration |
---|---|
Columns to process |
Select the column or columns on which you want to apply the function. If you want to apply it on more than one column, use the drop-down list to select which columns, and click Apply. |
Date format |
Select the expected date format for the column.
|
Create new column | Select this check box if you want to output the result of this function in a new column and keep the original untouched. |
Convert to time
Converts the type of data contained in the column so that it is interpreted as time in the system.
Properties
Property | Configuration |
---|---|
Columns to process |
Select the column or columns on which you want to apply the function. If you want to apply it on more than one column, use the drop-down list to select which columns, and click Apply. |
Date format |
Select the expected time format for the column.
|
Create new column | Select this check box if you want to output the result of this function in a new column and keep the original untouched. |
Convert to timestamp
Converts the type of data contained in the column so that it is interpreted as timestamp in the system.
Properties
Property | Configuration |
---|---|
Columns to process |
Select the column or columns on which you want to apply the function. If you want to apply it on more than one column, use the drop-down list to select which columns, and click Apply. |
Date format |
Select the expected timestamp format for the column.
|
Create new column | Select this check box if you want to output the result of this function in a new column and keep the original untouched. |
Create date from parts
Creates a new date column by concatenating numeric parts from other columns.
Properties
Property | Configuration |
---|---|
Year | Select the column that contains the information with the year for the date you want to create. |
Month | Select the column that contains the information with the month for the date you want to create. |
Day | Select the column that contains the information with the day for the date you want to create. |
New column name | Enter the name of the column that will be created for the concatenation. If you do not enter a new name, the default column name will be new_date. |
Example
Input | Configuration | Output |
---|---|---|
|
|
Column D: 10/21/2021 |
Create time from parts
Creates a new time column by concatenating numeric parts from other columns.
Properties
Property | Configuration |
---|---|
Hour | Select the column that contains the information with the hours for the time you want to create. |
Minute | Select the column that contains the information with the minutes for the time you want to create. |
Second | Select the column that contains the information with the seconds for the time you want to create. |
Millisecond | Select the column that contains the information with the milliseconds for the time you want to create. |
New column name | Enter the name of the column that will be created for the concatenation. If you do not enter a new name, the default column name will be new_time. |
Example
Input | Configuration | Output |
---|---|---|
|
|
Column E: 09:56:30.100 |
Create timestamp from parts
Creates a new timestamp column by concatenating numeric parts from other columns.
Properties
Property | Configuration |
---|---|
Year |
Select the column that contains the information with the year for the timestamp you want to create. |
Month | Select the column that contains the information with the month for the timestamp you want to create. |
Day | Select the column that contains the information with the day for the timestamp you want to create. |
Hour | Select the column that contains the information with the hours for the timestamp you want to create. |
Minute | Select the column that contains the information with the minutes for the timestamp you want to create. |
Second | Select the column that contains the information with the seconds for the timestamp you want to create. |
Millisecond | Select the column that contains the information with the milliseconds for the timestamp you want to create. |
New column name | Enter the name of the column that will be created for the concatenation. If you do not enter a new name, the default column name will be new_timestamp. |
Example
Input | Configuration | Output |
---|---|---|
|
|
Column H: 10/12/2021 9:56:30 AM |
Extract date parts
Extracts parts of a date and creates separate columns with the selected date parts.
Properties
Property | Configuration |
---|---|
Columns to process |
Select the column or columns on which you want to apply the function. If you want to apply it on more than one column, use the drop-down list to select which columns, and click Apply. |
|
Select which columns will be created using the toggles. Each selected part will be extracted in a different column. The default column name will be <prefix_or_source_column_name>_<date_part>. |
Date part prefix | Enter a custom prefix that will be added to the name of each created column. If you do not specify a prefix, the name of the source column with the dates will be used as prefix. |
Example
Input | Configuration | Output |
---|---|---|
10/12/2021 9:56:30 AM |
|
|
Format date
Changes the date format to use in a date column.
Properties
Property | Configuration |
---|---|
Columns to process |
Select the column or columns on which you want to apply the function. If you want to apply it on more than one column, use the drop-down list to select which columns, and click Apply. |
Date format |
Select one of the predefined formats from the drop-down list or enter a custom one to apply on the dates:
|
Create new column | Select this check box if you want to output the result of this function in a new column and keep the original untouched. |
Example
Input | Configuration | Output |
---|---|---|
12-31-2000 |
|
31/12/2000 |
05/04/2017 | Date format: Weekday, MMMM D, YYYY hh:mm:ss AM/PM | Thursday, May 4, 2017 12:00:00 am |
Truncate date
Removes part of a date. The date or timestamp will be set to the first point of the unit to which you are truncating.
Properties
Property | Configuration |
---|---|
Columns to process |
Select the column or columns on which you want to apply the function. If you want to apply it on more than one column, use the drop-down list to select which columns, and click Apply. |
Time unit |
Select the part of the date after which the value will be truncated. If truncating to Day or higher, the value returned will be a date, otherwise, it will be a timestamp.
|
Create new column | Select this check box if you want to output the result of this function in a new column and keep the original untouched. |
Example
Input | Configuration | Output |
---|---|---|
2024-06-22 | Time unit: Year | 2024-01-01 |
2024-06-22 11:05 |
Time unit: Month |
2024-06-01 |
2024-06-22 11:05:35 |
Time unit: Second |
2024-06-22 11:05:01 |