Date Formatting

In table charts and on x-axis labels, Chartio automatically formats dates into a more legible format when detected. Formatted date labels will be spaced evenly along the x-axis. In order for Chartio to recognize dates, they need to be formatted in a certain way in your query.

This formatting is automatically applied in Interactive Mode. In SQL Mode, please use the following input formats:

Date Bucket Input Format Default Output Format1
Second 2014-01-01T12:01:01 Jan 01, 2014 12:01:01
Minute 2014-01-01T12:01 Jan 01, 2014 12:01
Hour 2014-01-01T12 Jan 01, 2014 12:00
Day 2014-01-01 Jan 01, 2014
Week 2014-W01 Dec 30 2013-Jan 5 2014
Month 2014-01 Jan 2014
Quarter 2014-Q1 2014 Q1
Year Y2014, 2014 2014

  1. X-axis label format will vary based on the width of your chart and the number of data points. For example, in a line chart with dates bucketed by day, the labels may be grouped by month to save space.

For more information on date formatting syntax, please see the documentation specific to your database type.

Custom date formats

For table charts, the date format can be set in your Chart Settings, in the Column Formatting tab.

At this time, it is not possible to customize the auto-generated date formatting on the x-axis.