Truncate Dates in TSV Files Online
Truncate date and timestamp columns in TSV 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 TSV files
- Drop your file onto the upload area. The first date or timestamp column is selected for you, and the first 200 rows are shown.
- 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.
- Pick the precision under "Truncate to": year, quarter, month, week, day, hour, minute or second. Month is the default.
- 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.
- 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 (TSV)
ticket_id opened_at priority
T-101 2026-06-03 14:20:00 high
T-102 2026-06-07 23:59:00 low
T-103 2026-06-08 08:05:00 medium
T-104 2026-06-12 17:40:00 high
T-105 lowSettings
- Column to truncate: opened_at
- Truncate to: Week (Monday, as a date)
- Output mode: Append as new column, named opened_week
Result
| ticket_id | opened_at | priority | opened_week |
|---|---|---|---|
| T-101 | 2026-06-03 14:20:00 | high | 2026-06-01 |
| T-102 | 2026-06-07 23:59:00 | low | 2026-06-01 |
| T-103 | 2026-06-08 08:05:00 | medium | 2026-06-08 |
| T-104 | 2026-06-12 17:40:00 | high | 2026-06-08 |
| T-105 | NULL | low | NULL |
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.
Frequently Asked Questions
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 CSV Files Online
Group and count rows by any column in CSV files directly in your browser. Sort by frequency or value to find the most common entries — no upload required.
Aggregate CSV Files Online
Group and aggregate CSV 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 CSV Files Online
Filter CSV 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 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.
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.
TSV Viewer Online
View and inspect TSV files directly in your browser. Browse rows, check column names and data types — no upload required, your data stays on your device.