Skip to main content

Timestamp Convert

Timestamps from a data source sometimes needs to be converted to the requirement of the report. For example, it is common to find timestamps in Coordinated Universal Time (UTC), which is the primary time standard by which the world regulates clocks, needing to be converted into a local time.

This function converts cell values in the Apply To range based on the Format specified. The converted timestamps are written based on the Placement settings. To overwrite the timestamps with the converted, set the Placement cell to the top left corner of the Apply To range.

Settings

Format

The format to convert the timestamp to. The following are available:

  • Locale Time

    Use this Format if the timestamps to convert are in UTC time and need to be converted to a time in a specific Locale.

  • UTC Time

    Use this Format if the timestamps to convert are in a time in a specific Locale and need to be converted to UTC time.

  • Custom

    Use this format to add or subtract from the timestamps. The Value and Unit settings are used for this setting.

Locale

The time zone to convert the timestamp to (if Format is Locale Time) or to convert the timestamp from (if Format is UTC Time).

If left blank this is assumed to be the time zone of the Windows OS.

A list of all supported Locale setting can be found in the text file timezones.txt. This is located in the installation directory of the product (C:\XLReporter by default).

This setting can be a fixed time zone name or a cell reference. When set as a cell reference the cell specified is the top row of a list of time zones that correspond to every row of data in the Apply To range.

Value, Unit

The value to adjust the timestamp (positive or negative) in the unit specified.

Example

A report contains totals of the previous day, but the timestamps are from the current day. If the timestamp is written to cell $B$4, it can be converted to the previous day as follows:

Apply To

Cell

$B$4

Direction

None

End

All cells are empty

Placement

Cell

$B$4

Type

Direct

Setting

Value

Format

Custom

Locale

Value

1

Unit

Day