Articles in this section
Category / Section

How to Convert Unix Epoch Timestamps to Readable Formats in Bold Reports


Converting the Unix Epoch timestamps into human-readable date and time formats is a common requirement when working with time-based data in Bold Reports. The Unix Epoch timestamps represent the number of seconds that have elapsed since the Unix epoch, which serves as a reference point for time measurement. This comprehensive guide will walk you through the process of converting the Unix Epoch timestamps to easily understandable formats in Bold Reports.

Use the following expressions to convert the Unix timestamps to readable formats in Bold Reports:

Unix timestamps values in seconds:

=Format(DateAdd("s", 1684153114, "01/01/1970"), "MM/dd/yyyy HH:mm:ss")
=Format(DateAdd("s", Fields!timestamp.Value, "01/01/1970"), "MM/dd/yyyy HH:mm:ss")

Unix timestamps values in milliseconds:

=Format(DateAdd("s", 1684153114352/1000, "01/01/1970"), "MM/dd/yyyy HH:mm:ss")
=Format(DateAdd("s", Fields!timestamp.Value/1000, "01/01/1970"), "MM/dd/yyyy HH:mm:ss")

Optionally, provide additional information about the time format:

To display the time in a 24-hour format, use the expression:

=Format(DateAdd("s", Fields!timestamp.Value/1000, "01/01/1970"), "MM/dd/yyyy HH:mm:ss")

To display the time in a 12-hour format, use the expression:

=Format(DateAdd("s", Fields!timestamp.Value/1000, "01/01/1970"), "MM/dd/yyyy hh:mm:ss tt")

Note: The choice of January 1, 1970, as the Unix epoch holds historical significance. It was selected during the development of the Unix operating system in the 1960s and 1970s. Designating January 1, 1970, as the starting point of the Unix epoch allowed for positive and negative timestamps, and it was a widely accepted reference point within the Unix community. Since then, the Unix epoch has become a widely adopted standard for representing time in various computer systems and programming languages, ensuring consistency and interoperability in time-related operations.

Find the sample report below:

Was this article useful?
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied