SmartQueryTools

Truncate Dates in Parquet Files Online

Truncate date and timestamp columns in Parquet files to a chosen precision — year, quarter, month, week, day, hour, or minute — directly in your browser. Rounds timestamps down to the start of each period. No upload required.

How to truncate Dates in Parquet files

  1. Drop your file onto the upload area. The first date or timestamp column is selected for you, and the first 200 rows are shown.
  2. Check the "Column to truncate" choice. Each column is listed with its detected type, so you can see whether it loaded as a date, a timestamp or text.
  3. Pick the precision under "Truncate to": year, quarter, month, week, day, hour, minute or second. Month is the default.
  4. Choose "Replace column in place", or "Append as new column (keeps original)" and give the new column a name. The default name is the column name plus _trunc.
  5. Click Truncate Dates, check the preview, and download the result in the same format you uploaded.

Your file is processed locally in your browser and is never uploaded. The free limit is 50 MB per file; larger files work if your device has the memory for them.

Worked example

A support team exports ticket open times and wants a week column to count tickets per week in a pivot table, while keeping the exact open time for reference.

Input (Parquet)

Parquet file (binary, columnar) — shown as a table with its schema

ticket_idopened_atpriority
T-1012026-06-03 14:20:00high
T-1022026-06-07 23:59:00low
T-1032026-06-08 08:05:00medium
T-1042026-06-12 17:40:00high
T-105NULLlow

Schema: ticket_id VARCHAR, opened_at TIMESTAMP, priority VARCHAR

Settings

  • Column to truncate: opened_at
  • Truncate to: Week (Monday, as a date)
  • Output mode: Append as new column, named opened_week

Result

ticket_idopened_atpriorityopened_week
T-1012026-06-03 14:20:00high2026-06-01
T-1022026-06-07 23:59:00low2026-06-01
T-1032026-06-08 08:05:00medium2026-06-08
T-1042026-06-12 17:40:00high2026-06-08
T-105NULLlowNULL

Weeks start on Monday, so Wednesday 3 June and Sunday 7 June both fall in the week of Monday 1 June. A ticket opened a few minutes after midnight on Monday 8 June starts the next week. The missing open time stays empty. For year, quarter, month, week and day the new column holds plain dates. Hour, minute and second keep a time part.

Working with Parquet files

Parquet DATE and TIMESTAMP columns arrive typed, so no text parsing is involved. Timestamps stored in milliseconds, microseconds or nanoseconds are all converted to microsecond precision before truncating. For hour, minute and second the output is a TIMESTAMP column, and choosing second removes any fractional part. For day and above the output column becomes DATE, which is a different Parquet type from the input. A DATE input column truncated to hour, minute or second comes back as a TIMESTAMP at midnight, because a date has no time part to keep.

Parquet timestamps marked as UTC-adjusted load as timestamp with time zone. They are converted to a plain timestamp using the session time zone before truncating, so check a few values near midnight and month ends if your data spans time zones. Replace mode keeps the column in its original position with the original name. Other columns, including nested structs, are copied through unchanged. The file is rewritten with new row groups.

Frequently Asked Questions

Does truncating change the Parquet column type?

It can. Truncating to year, quarter, month, week or day writes a DATE column. Hour, minute and second write a TIMESTAMP column. Use Append mode if downstream code expects the original type in the original column.

Are nanosecond Parquet timestamps supported?

Yes. They load and truncate correctly, and the result is stored at microsecond precision. Every option, including second, removes the sub-second part, so no precision is actually lost in the output.

What day does a truncated week start on?

Monday. Week truncation follows ISO weeks, so every value from Monday 00:00 to Sunday 23:59:59 maps to that Monday.

Does truncating round to the nearest period?

No. It always rounds down to the start of the period. 2026-06-30 23:59 truncated to month is 2026-06-01, not 2026-07-01.

What happens to values that are not valid dates?

They become empty (NULL) in the output. The run does not fail, so compare the number of empty cells before and after to spot parsing problems.

Related Tools

Count Values in Parquet Files Online

Group and count rows by any column in Parquet files directly in your browser. Sort by frequency or value to find the most common entries — no upload required.

Aggregate Parquet Files Online

Group and aggregate Parquet files by any column directly in your browser. Calculate sum, average, min, max, and count for any numeric column — no upload required.

Filter by Date Range Parquet Files Online

Filter Parquet files to rows within a date range using simple start and end date pickers. See a live match count before you apply the filter — no upload required, runs in your browser.

Truncate Dates in CSV Files Online

Truncate date and timestamp columns in CSV files to a chosen precision — year, quarter, month, week, day, hour, or minute — directly in your browser. Rounds timestamps down to the start of each period. No upload required.

Truncate Dates in Excel Files Online

Truncate date and timestamp columns in Excel files to a chosen precision — year, quarter, month, week, day, hour, or minute — directly in your browser. Rounds timestamps down to the start of each period. No upload required.

Truncate Dates in JSON Files Online

Truncate date and timestamp columns in JSON files to a chosen precision — year, quarter, month, week, day, hour, or minute — directly in your browser. Rounds timestamps down to the start of each period. No upload required.

Parquet Viewer Online

View and inspect Parquet files directly in your browser. Browse rows, check column names and data types — no upload required, your data stays on your device.

Convert Parquet to CSV Online

Convert Parquet files to CSV format directly in your browser. No upload required — your data never leaves your device.