cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a Calculated Field for Date and Time

former_member374954
Participant
0 Kudos

Hello Gurus,

I have a requirement and need to create a calculated Date field. Date Timestamp, from Database is coming in GMT but I need to show data in Local Date timestamp (-5). How can I do that.

Please help!

Regards

Prashant

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member4998
Active Contributor
0 Kudos

Hi

You can change the date format @ universe level using the create display format.

Please find the below link for more info.

http://scn.sap.com/community/semantic-layer/blog/2014/04/18/bi41-business-layer-enhancements--create...




former_member374954
Participant
0 Kudos

I am not asking about formatting the display.

I used following formula in the definition column and it parsed correct:-

(Date Object) - Interval '5' HOUR.

It  validates correct but when I try to create a query it says "InvalidTimestamp"

Any suggestions please?

former_member4998
Active Contributor
0 Kudos

Hi  try below if helpful. 

to_char(DateObject + (timezone*60)/1440,'DD/MM/YY HH24:MI:SS')

Like to_char(Start_Time + (-5*60)/1440,'DD/MM/YY HH24:MI:SS')