Date Formats
Learn how to format dates and times in your data so DataPicta recognizes them correctly.
There is no special date field type in DataPicta — fields are either text or numbers. Dates are simply text values that follow a date-friendly format, so they can be understood and used in charts. This page covers which formats are recognized and what to avoid.
Where DataPicta uses dates
Dates appear in several places throughout the chart:
- Time axis — in the axis panel you can set the axis type to time to get a date-based axis. See Axis Settings for more details.
- Candlestick charts — the Date column is expected to contain date values. See Data Formats: Candlestick.
- Streamgraph charts — the first column is expected to be a date. See Data Formats: Streamgraph.
- Sorting and filtering — dates are sorted chronologically, even though they are stored as text values. See Sort and Filter Data.
Recommended formats (ISO 8601)
DataPicta accepts date and time values in common, standards-based formats. If a value cannot be read as a valid date, it is skipped. To keep things smooth, stick to the well-defined ISO 8601 forms below. If you want a quick primer, see the ISO 8601 overview on Wikipedia.
The date-only format is the most commonly used one — most charts just need a date without a time:
2024-12-31
If you also need the time of day, include it after a T separator. Use a trailing Z to indicate UTC, or an offset like +01:00 to indicate a specific time zone:
2024-12-31T14:30:00Z
2024-12-31T15:30:00+01:00
2024-12-31T14:30:00.123Z
These formats are unambiguous, time-zone aware (when you include Z or an offset), and the most reliable. The order is always year-month-day (YYYY-MM-DD). Do not swap day and month — 2024-12-31 is December 31, not January 12.
Other formats (use sparingly)
These formats can also be read, though ISO 8601 is still the safest choice:
December 31, 2024
Dec 31, 2024
December 31, 2024 2:30 PM UTC
Use these when your data source already uses them — for example, if you are copying data from a spreadsheet that formats dates this way. Just be aware that parsing is less predictable than with ISO 8601.
Formats to avoid
Please skip these; they are ambiguous and often fail to parse correctly:
31-12-2024or12-31-2024— day and month order is unclear12/31/2024or31/12/2024— slashes and ambiguous order2024/12/31— slashes instead of dashes31-12-24— two-digit year
The safest habit is to always use ISO 8601 with dashes (YYYY-MM-DD). This way your dates work the same way regardless of where the data comes from or who reads it.
How dates behave in charts
When you use dates in your data, a few things happen automatically:
- Time axis — when you set an axis type to time, DataPicta scales the axis based on the date range of your data. Labels show dates instead of numeric values, and the spacing adapts to the time interval (days, months, years).
- Data zoom — time-based charts work with the data zoom feature, letting you pan and zoom along the date range. See Data Zoom for more details.
Related
- Data Formats — data structure per picta type
- Sort and Filter Data — sorting and filtering your data
- Axis Settings — setting up a time axis
- ISO 8601 overview on Wikipedia
