SAP Knowledge Base Article - Public

3679706 - How to avoid Time Zone conversion in Story reports

Symptom

Story reports will, by default, convert timestamped date records to the time zone of the machine running the report. I.e.:

  • A Start Date is stored in the database as December 10th 2:00 AM UTC+1. If you run a Story report while located in UTC-3, the record will come up as December 9th 10:00 PM.

This KBAs provides an approach to avoid this time zone conversion in Story reports.

Environment

SAP SuccessFactors HCM Suite

Resolution

Create a calculated column using the formula below, replacing the highlighted sections with the column/field to which you want to apply this workaround:

  • IF(ISNULL([Time Management#Employee Time Sheet#Start Date]),  CURRENTDATE(), TODATE(CONCAT(CONCAT(CONCAT(TOTEXT(DAY([Time Management#Employee Time Sheet#Start Date])) ,'/' ) ,CONCAT(TOTEXT(MONTH([Time Management#Employee Time Sheet#Start Date])) ,'/' ) ) ,TOTEXT(YEAR([Time Management#Employee Time Sheet#Start Date])) ),'dd/mm/yyyy' ) )

This approach deconstructs the original date field and rebuilds it using the DAY, MONTH, and YEAR functions, which are not affected by localization settings. The resulting string is then converted back into a date using the TODATE function.

This method returns only the date, meaning the original timestamp will not be preserved in the output.

NOTE:

  • If the Start Date field is null, the formula returns CURRENTDATE().

  • Do not use this calculated field in filters or input controls, as doing so may break the report and is not supported.

  • If you see the message: "Formula could not be computed: Function 'ToDate' expects parameter 1 to be of type Datetime. Please complete or rewrite the formula."
    This may be caused by the data type of the field in the database. In such cases, try building the logic without using TODATE. For data type questions, the module responsible for the data source must be contacted.

See Also

3584115 - Adjusting browser time zone to align Story Reports outputs with UI outputs

Keywords

Story, wrong date, time zone, conversion, timestamp, timezone, people stories, time management, timesheet, report. , KBA , LOD-SF-ANA-SAC-QDS , Query Designer - Filter, Calculated Column, Params , How To

Product

SAP SuccessFactors HCM Core 2505