Documentation

Set Date Format

 

 

In case you are using a custom date format as a dimension in your SQL query and wish to enable this chart as filter on your dashboard, you will be asked to specify this format on the dashboard before you can apply the date as quick filter. Here is a quick tutorial on how to define the date format of your SQL on the dashboard.

 

Let’s assume we are creating a chart on our dashboard with the following SQL query using a custom date format.

 

Select DATE_FORMAT( `Customer`.`Signup_date`, '%Y %m'), count(`Customer`.`CustomerID`)
From `Customer`
Group by 1

 

After we have saved this query to the dashboard, we will need to specify the date format for the filter functions. In your dashboard enable click-to-filter for this SQL chart first and then click on one of the data series in this on the chart. In the Date Format popup, you will then be asked to define the format used in the SQL query.

 

how to set the date format in datapine

 

  1. Simply specify the format used in the textbox next to Date Format.
  2. You can use the list of codes on the right to define the right format.
  3. Then Save your date format.

You can now use the date as filter. Please note, if you make changes to the SQL query you might need to redo this process.