cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Formatting DateTime Columns in Story Analytics (Reporting Center)

skusulja
Explorer
2,551

In the Reporting Center, using Story Analytics, is there a straightforward way to format DateTime columns?

For example:

  • In the Recorded Time Data table, the Start Date column is displayed as: Jan 1, 2025 1:00:00 AM (I want only the date part).
  • Similarly, the Start Time column is displayed as: Jan 1, 1970 09:00:00 AM (I want only the time part).

Both columns are formatted as DateTime by SAP.

I’ve tried using the ToDate function, but it doesn’t work and throws the following errors:

  1. ToDate([Time Management#Recorded Time Data#Start Date], "yyyy/dd/MM")
    • Error: Formula could not be computed: Function "ToDate" expects parameter 1 to be of type String. Please complete or rewrite the formula.
  2. ToDate("[Time Management#Recorded Time Data#Start Date]", "yyyy/dd/MM")
    • Error: Internal error occurred while processing.

I also attempted several other approaches, including nested functions with If, Concat, and SubString, but none of them resolved the issue.

Is there a simple or recommended approach to extracting only the date or time from these DateTime columns? Any advice would be greatly appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

subbareddyven
Product and Topic Expert
Product and Topic Expert

Hi @skusulja ,

To fetch only date try like below

TODATE(CONCAT(TOTEXT(YEAR([Date] )) ,
CONCAT("/" , CONCAT(TOTEXT(MONTH([Date] )) ,
CONCAT("/" ,TOTEXT(DAY([Date] )) ) )) ), "yyyy/mm/dd" )

Regards,

Subbu

skusulja
Explorer
0 Kudos
This is the one, thank you
Eugene_D_Fourie
Active Participant
And only the timestamp?
skusulja
Explorer
0 Kudos
Usually, time and date are stored in separate columns—one for each—and may be located in different query tables. They just need to be identified.

Answers (2)

Answers (2)

Dren
Participant
0 Kudos

SAP came up w this KBA: 2986093 - How to manually change the Date Format for a date field in Story report - SAP for Me

In my view, this is a deficiency on the product to allow clients via UI to pick the format for Date/Time fields

the version that worked for me was:

MM/dd/yy
CONCAT(TOTEXT(MONTH([FIELD_NAME])),CONCAT("/",CONCAT(TOTEXT(DAY([FIELD_NAME])),CONCAT("/", RIGHT(TOTEXT(YEAR([FIELD_NAME])),2))))) 

alex_roman
Discoverer
0 Kudos

Hi,

Have you tried only this formula?

ToDate([Time Management#Recorded Time Data#Start Date])

thanks,