All Collections
Number & Date Formatting
Number & Date Formatting

Formatting dates and numbers in Astrato, including solving for viewing across timezones.

Piers Batchelor avatar
Written by Piers Batchelor
Updated over a week ago

Date formatting

Working with Timezones

In Astrato, the locale can be set in the data view. All workbooks and users, regardless of timezone will see the data presented in the same timezone and format for a trusty single version of the truth.

Risks when using data fields with timezones โ€ผ

If you use date group by functions in Astrato, the SQL pushed down will ignore the timezone. 8AM in New York City, US and 8AM in London,UK will be presented at the same time.

Best practice with timezone fields:

If you are using date fields that do have a timezone, depending on any extra processing grouping or roll-up done on timestamps, there may be inaccuracies. To solve this, it is best to unify the timezones and create a new timezone free field in your database. We do not recommend replacing or removing fields in tables in the data view since they may be used in Astrato or by other applications.

To create a unified datetime/timestamp field in Snowflake, you can use the code below as a reference.

โš  The code below is a quick reference, we do not encourage replacing tables in your database. If you wish to do so, ensure time travel is in use.

create or replace table MYTABLE as

Number formatting

In Astrato we use custom formatting rules that are presented in the site below. This can of course be mixed with plain text and even emojis! Formatting is incredibly easy and you can copy/paste from even more presets.

Prefix / Suffix

A prefix can be used for adding currency or explaining metrics shown.

Combining prefix & suffix: Taking advantage of custom formatting

Custom formatting allows you to blend custom text and formatting instructions.

Did this answer your question?