MonthStart / Temporal Layer

Roll dates backward to first day of their respective months, similar to pandas date.replace(day=1) or SQL DATE_TRUNC('month'). Preserves time components.

Example transformations:

Input DateMonth StartDays Moved
2024-01-15 10:30:002024-01-01 10:30:00-14
2024-02-29 00:00:002024-02-01 00:00:00-28
2024-03-31 23:59:592024-03-01 23:59:59-30

Common applications:

  • Monthly billing cycles
  • Subscription periods
  • Financial reporting
  • Period-start balances
  • Monthly metric resets

Note: Time components (hours, minutes, seconds) remain unchanged; only the day is adjusted to the first of the month.

Table
0
0
Table

Transforms

[, ...]

Select

column

Date/datetime column to adjust to month starts. Each date will be moved to the first day of its respective month while maintaining its time components.

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.