Round / Temporal Layer

Round datetime values to specified time units, similar to pandas round() or SQL DATE_TRUNC(). Supports multiple time granularities and custom intervals.

Example rounding operations:

Input DateTimeRound ToResultNote
2024-01-01 12:34:56.78915 Minutes2024-01-01 12:30:00Quarter hour
2024-03-15 23:59:591 Day2024-03-16 00:00:00Midnight
2024-07-18 14:30:001 Month2024-08-01 00:00:00Month start
2024-11-28 08:45:303 Months2024-10-01 00:00:00Quarter start

Common applications:

  • Time series aggregation
  • Data regularization
  • Schedule alignment
  • Interval analysis
  • Performance binning
  • Log file processing
Table
0
0
Table

Select

column

Datetime column to round. Values will be adjusted to the nearest interval based on specified rounding configuration.

Configuration for rounding interval, combining unit and frequency. Example: 15 Minutes for quarter-hour rounding.

Nanosecond

Time units for rounding. Each unit defines the granularity of the rounded result, with calendar units respecting time changes and period boundaries.

Nanosecond ~

Round to nanoseconds (10⁻⁹ s). For ultra-precise scientific or technical data.

Microsecond ~

Round to microseconds (10⁻⁶ s). For system-level timing analysis.

Millisecond ~

Round to milliseconds (10⁻³ s). For application performance data.

Second ~

Round to seconds. Common for log timestamps and human-readable times.

Minute ~

Round to minutes. Useful for scheduling and interval analysis.

Hour ~

Round to hours. Handles DST transitions appropriately.

Day ~

Round to calendar days (midnight to midnight). Respects DST changes.

Week ~

Round to calendar weeks (Monday start). Maintains consistent week boundaries.

Month ~

Round to calendar months. Handles varying month lengths automatically.

Quarter ~

Round to calendar quarters (Q1-Q4). Aligns with standard fiscal periods.

Year ~

Round to calendar years. Handles leap years appropriately.

IndexCount ~

Round based on row position. For position-based aggregation.

1

Number of units to round to. Examples:

  • 15 (with Minutes): Round to nearest 15 minutes
  • 4 (with Hours): Round to nearest 4 hours
  • 3 (with Months): Round to nearest quarter Must be positive.

Name for the new column. If not provided, the system generates a unique name. If AsColumn matches an existing column, the existing column is replaced. The name should follow valid column naming conventions.