cancel
Showing results for 
Search instead for 
Did you mean: 

We need to convert DATE_TIME to DATE or a work around in C4C

claudiofrancketc
Discoverer
0 Kudos

Hello:

For the background info, our development partner, we don’t know why created a filed using DATE_TIME, knowing it was to be used as a selection criteria in reports, fast forward 5 years, and our database has grown and the report when using that criteria no longer Works, “Report Incident error” or other errors. I have consulted with SAP and they said it was not good practice to use such data tye for this.

We cannot easily nor cheaply create a new field with just DATE type since it would require lots of changes to internal logic and mostly integration, Web Services, IDOCS it would be too expensive and time consuming as well as a huge risk.

We are trying to optimize the report which is very complex it uses several data sources and some of them created by use using other data sources. Also, we are trying to create a simplified version just to get the basic data we need that could still allow us to use that field.

Some of the other ideas we have been trying is to create a second field kept hidden and using a workflow rule copy just the DATE part. So far, we have only been able to do it as text, but when we copy it to a DATE or decimal type I get an error that data types do not match, and I cannot continue. Maybe there is way.

Finally, the trigger option would be similar to the previous one, create a DATE field and populate it with the date using the SDK, but we don not know how to approach that.

If you can think of anything else, I would be grateful.

Sorry if it is too long.

Kind Regards

Accepted Solutions (1)

Accepted Solutions (1)

former_member226
Employee
Employee
0 Kudos

Hi,

There are multiple ways to deal with it. If you are comfortable wityh SDK baed solution then you use either of the following solution:

1. Use "ConvertToDate()" function and store the date in a new field of type Date.

for e.g. SystemAdministrativeData.CreationDateTime.ConvertToDate()

2. Otherwise use Reuse Library GlobalDateTime as mentioned on help

Answers (1)

Answers (1)

senthilmurugan
Participant
0 Kudos

Hello Claudio,

If the DateTime field is created as KeyFigure(or if it already deployed, you can create new data source and mark the field as keyfigure), Using Transformation Rule you can convert DateTme to Date, then you can use it as slection parameters for report, not sure if it works but worth a try.

BR,

Senthil