Dates Transforms
The Dates category of transforms allows users to manipulate date and time columns for analysis, calculation, and conversion across time zones.
The Dates transforms provide a comprehensive set of tools for advanced date and time manipulation, allowing users to perform complex operations like calculating time differences, extracting specific temporal components (e.g., day of the week, quarter), reformatting dates for consistency, and accurately converting between various time zones to support sophisticated temporal data analysis and reporting.
Best Situations to Use
Adjust time values for different time zones.
Add or calculate durations between date/time columns.
Standardize datetime formats for reporting and analysis.
Generate new datetime columns for feature engineering or analytics.
Add Duration
The Add Duration transform adds time to a datetime column. You can add a fixed value or add time from another column.
Best Situations to Use
Calculate elapsed time between two datetime columns.
Add a fixed duration to a timestamp (e.g., add 2 hours).
Steps – Using Another Column
Select the target column (e.g.,
Time Out
).Open Transforms > Dates > Add Duration.
Enable Create New Column (optional).
Select Other Column and choose the column providing duration (e.g.,
Time In
).Click Submit.
Steps – Using a Fixed Value
Select the target column.
Open Transforms > Dates > Add Duration.
Enable Create New Column (optional).
Select Value, and enter the fixed duration (e.g.,
2 hours
).Click Submit.
Add Interval to Date
Adds a specified interval (years, months, days, weeks, hours, minutes, milliseconds) to a datetime column.
Best Situations to Use
Shift dates forward or backward for forecasting or scheduling.
Create derived columns with time-based offsets.
Steps
Select a datetime column.
Open Transforms > Dates > Add Interval to Date.
Enable Create New Column (optional).
Configure:
Input Format: Year first, Month first, or Day first.
Value Type: Interval type (e.g., months).
Value: Number of intervals to add.
Click Submit.
Convert From UTC
Converts datetime values assumed to be in UTC to a specified time zone.
Best Situations to Use
Display timestamps in local time zones.
Align datasets from different regions for analysis.
Steps
Select a UTC datetime column.
Open Transforms > Dates > Convert From UTC.
Provide a new column name.
Select the Target Time Zone.
Click Submit.
Convert Timezone
Converts datetime values from a source time zone to a target time zone.
Best Situations to Use
Normalize timestamps from different sources or time zones.
Prepare datasets for time-sensitive analytics.
Steps
Select a datetime column.
Open Transforms > Dates > Convert Timezone.
Provide a new column name.
Specify Source Time Zone and Target Time Zone.
Click Submit.
Convert To UTC
Converts datetime values from a specified time zone to UTC.
Best Situations to Use
Standardize timestamps for data integration.
Ensure consistent time references across global datasets.
Steps
Select a datetime column.
Open Transforms > Dates > Convert To UTC.
Provide a new column name.
Specify the Source Time Zone.
Click Submit.
Extract Date Part
Extracts specific components from a date or datetime column, such as day, month, year, week, quarter, or day of the week/year.
Best Situations to Use
Derive features like month, quarter, or day of week for aggregation.
Analyze temporal patterns in datasets.
Steps
Select a datetime column.
Open Transforms > Dates > Extract Date Part.
Select the Input Format for the column.
Choose the components to extract:
Day, Month, Year
Day of Week (1–7, Sun–Sat, Sunday–Saturday)
Day of Year (1–365)
Week of Year (1–53)
Quarter (Normal, Financial, Custom)
Click Submit.
Extract Time Unit
Extracts hours, minutes, seconds, milliseconds, or converts time to milliseconds from a time or datetime column.
Best Situations to Use
Analyze time-based patterns within a day.
Prepare features for temporal analysis or modeling.
Steps
Select a datetime column.
Open Transforms > Dates > Extract Time Unit.
Select units to extract: Hours, Minutes, Seconds, Milliseconds, Time to Milliseconds.
Click Submit.
Find Date Difference
Calculates the difference between two dates or a date and a fixed value.
Best Situations to Use
Compute duration or age between dates.
Derive feature columns for temporal analysis.
Steps
Select a date column.
Open Transforms > Dates > Find Date Difference.
Enable Create New Column (optional).
Specify:
Input Format
Use With: Value or another column
Value: Date or reference column
Click Submit.
Format Date
Changes the format of a date column according to desired patterns for year, month, day, delimiter, or timestamp inclusion.
Best Situations to Use
Standardize date columns for reporting or analysis.
Convert date formats to match system or application requirements.
Steps
Select a date column.
Open Transforms > Dates > Format Date.
Configure:
Source Format Hint
Target Format (Year, Month, Day)
Year Pattern:
yyyy
oryy
Month Pattern:
0-12
,Jan-Dec
,January-December
Delimiter
Include Timestamp (optional)
Click Submit.
From Unix Time
Converts Unix timestamps to human-readable date formats.
Best Situations to Use
Convert datasets with epoch time to a readable datetime.
Prepare data for analysis or visualization.
Steps
Select a Unix timestamp column.
Open Transforms > Dates > From Unix Time.
Enable Create New Column (optional).
Specify Output Format.
Click Submit.
Sub Interval to Date
Subtracts a specified time interval (years, months, days, weeks, etc.) from a date column.
Best Situations to Use
Compute historical dates relative to a reference date.
Adjust dates for scheduling, forecasting, or backdating analysis.
Steps
Select a date column.
Open Transforms > Dates > Sub Interval to Date.
Enable Create New Column (optional).
Configure:
Input Format
Value Type: Interval type (years, months, days, weeks)
Value: Number of units to subtract
Click Submit.
Dates Transforms – Subtract Duration
The Subtract Duration transform allows users to deduct time values in a column either by a fixed value or by another column’s time values. It supports durations in formats: hh:mm:ss.mmm
, hh:mm:ss
, and hh:mm
. The result can replace the original column or be stored in a new column.
Best Situations to Use
Calculate time differences between start and end times.
Deduct fixed durations for time adjustments in schedules or logs.
Generate derived columns for analysis involving time intervals.
Not Recommended for:
Non-time columns.
Complex durations requiring multiple-step calculations across datasets (consider using Expression Editor).
Steps to Perform Subtract Duration
1. Using Another Column
Select a column containing time values (e.g.,
Time Out
).Navigate to Transforms > Dates > Subtract Duration.
Enable Create New Column (optional).
Select Use With > Other Column, and choose the column providing time values to subtract (e.g.,
Time In
).Click Submit.
Example:
Time Out – Time In → Subtracted Duration
.
2. Using a Fixed Value
Select a column containing time values.
Navigate to Transforms > Dates > Subtract Duration.
Enable Create New Column (optional).
Select Use With > Value, and enter a fixed time value (e.g.,
01:03:02
).Click Submit.
Example:
Time Out – 01:03:02 → Adjusted Duration
.
Last updated