Skip to content

Date Start Of

Input
value
Set value to start of year
transformation:
dateStartOf

Set date to the start of a calendar period

source:value
parameters
unit

Calendar period boundary

inputFormat

Luxon format pattern for date strings (for example yyyy-MM-dd or MM/dd/yyyy).

outputFormat

Luxon format pattern for date strings (for example yyyy-MM-dd or MM/dd/yyyy).

Output
value
2024-01-01
2024-01-01
2024-01-01
2024-01-01
invalid

Sample inputs run locally in your browser using the same operation logic as Fontana Flow.
Results are illustrative, not connected to a workflow.

Set date to the start of a calendar period.

Parameters

  • unit (Period unit, string, required) — Calendar period boundary. Allowed values: year, month, week, day.
  • inputFormat (Input format, string, optional) — Luxon format pattern for date strings (for example yyyy-MM-dd or MM/dd/yyyy). Examples: "yyyy-MM-dd", "MM/dd/yyyy", "dd-MM-yyyy".
  • outputFormat (Output format, string, optional) — Luxon format pattern for date strings (for example yyyy-MM-dd or MM/dd/yyyy). Examples: "yyyy-MM-dd", "MM/dd/yyyy", "dd-MM-yyyy".

Field selection

  • source — Field whose values this operation reads. Omit to apply to all fields on the row.
  • target — Optional output field. When omitted, the source field is updated in place.

JSON Configuration

{
"id": "op-dateStartOf",
"type": "transformation",
"action": "dateStartOf",
"params": {
"inputFormat": "yyyy-MM-dd",
"outputFormat": "yyyy-MM-dd",
"unit": "year"
},
"testInputs": [
"2024-06-15",
"2024-01-20",
"2024-12-31",
"2024-02-29",
"invalid",
""
]
}