Articles in this section
Category / Section

How to convert a timestamp column from one timezone to another in the PostgreSQL data source

Published:

The Bold BI application allows you to convert the timestamp column in the PostgreSQL data source from one time zone to another.

Steps to convert timestamp column to another time zone

  1. Refer to the Connecting Bold BI to PostgreSQL data source documentation for successful connection.

  2. Drag and drop the table from the table schema onto the data design view page.

    drag-timestamp-table.png

  3. Click on the Expression icon and choose the timestamp column that needs to be converted to the local time zone, as shown in the following image.
    expression-icon.png

    timestamp-column.png

  4. Then, add the following code to the timestamp column that needs to be converted from Greenwich Mean Time (GMT) to your local time zone in the Expression editor, as shown in the following image, and click Save.

    AT TIME ZONE 'GMT' AT TIME ZONE '+05:30' 
    

    The above sample registers the timestamp column in the GMT format and converts the timestamp into Indian Standard Time(IST).

    timezone-expression.png

    NOTE: The time difference between GMT and your local time zone should be manually set in the above sample.

  5. Click on Update and you will find the result, where the created timestamp column in GMT will be converted into Indian Standard Time.
    converted-timezone.png

    Note: This documentation is applicable to all web data sources in extract mode only, as well as PostgreSQL in live and extract modes in the Bold BI. For MS SQL Server and MySQL data sources, the following expressions should be used to convert the GMT date column to the Indian Standard Time zone.

    Data sources Expressions
    MS SQL Server DATEADD(mi,DATEDIFF(mi, GETUTCDATE(), GETDATE()),[last_requested])
    MySQL CONVERT_TZ([last_requested],‘+00:00’,‘+05:30’)
Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
NG
Written by Nisanth Gunasekaran
Updated:
Comments (0)
Please  to leave a comment
Access denied
Access denied