How to format the Date column type

This article provides information on how to work with the Date column type from the macro editor.

Instructions

  1. In the relevant Confluence page, add or update the required SQL Query macro. 
  2. Specify the required Data source profile, enter the SQL query in SQL statement, and click Run to view the retrieved data if the macro editor is opened for the first time, or proceed to the next step.
  3. Click the down arrow above the relevant column containing dates and click Column type > Date.

The succeeding sections address the following scenarios if the Date column type is selected:

  1. If the input format is a string
  2. If the input format is not International Organization for Standardization (ISO) format compliant

Input format is a string

  1. Leave the Input format unchanged.
  2. Provide the required format tokens to change the display format of the dates, or leave this parameter unchanged.
  3. Click Apply to change the display format.

The app automatically detects the input format that is ISO standard compliant and is supported by the Moment.js library. Refer to this article to know more about the supported formatting options and this article to know more about format tokens.

Input format is not in the standard ISO format

In this case, the app does not recognize the date format and may show the original data or a blank value for such dates. Here, you must specify the input format so that the app can understand the given date/time tokens and format the data as desired.

Let's consider the following example where the Date of Joining column does not follow standard date format:

Specify Input format as dd MM yyyy and Display format as yyyy-DD-MMM.

The output is then as follows:

Additional references

Log a request with our support team.

Confluence®, Jira®, Atlassian Bamboo®, Bitbucket®, Fisheye®, and Atlassian Crucible® are registered trademarks of Atlassian®
Copyright © 2005 - 2024 Appfire | All rights reserved. Appfire™, the 'Apps for makers™' slogan and Bob Swift Atlassian Apps™ are all trademarks of Appfire Technologies, LLC.