Category / Section
How to convert a column into a Timestamp with a specified format in Bold BI?
Published:
Using Expressions, we can convert a Column into a Timestamp with a specified format in Bold BI
- Create or edit a data source with date field. Click on the Expressions icon.
- Create an expression like below,
PostgreSQL:
TO_TIMESTAMP([ColumnName], 'DD/MM/YYYY')
MS SQL:
convert(datetime,[ColumnName], 103)
- Replace
[ColumnName]
with the name of the column you want to convert,InputFormat
with the current format of the column.
For example, if you have a column named OrderDate
with the format dd/MM/yyyy
, and you want to convert it into a timestamp, the expression in PostgreSQL would be:
TO_TIMESTAMP([OrderDate], 'DD/MM/YYYY')
The data type of the created expression will be DateTime:
Before Expression:
After Expression
Related Articles: