cancel
Showing results for 
Search instead for 
Did you mean: 

SAP C4C DateTimeUtilities help!!

DALJEET
Participant
0 Kudos

Hi Experts ,

I am using a DateTime Utility for getting the Calendar details used in service tickets , below is the screen shot of the code and the result I am getting.

Although it seems like that the date coming is correct but the calendar created has start time 1t 8:00 AM in the morning , which doesnt seems to be coming correct , can any one look into this and help me.

Accepted Solutions (1)

Accepted Solutions (1)

DALJEET
Participant
0 Kudos

Experts ,

Need some advice/Help on this please!!!

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Daljeet,

Normaly a day in a working calendar equals to 8 hours.

Therefore your duration "PT8H" equals to 24 hours.

As we see from the variables not timezone was determined. Therefore UTC is used.

Maybe you try it out with dedicated values for the calendar code and the timezone.

HTH,

     Horst

DALJEET
Participant
0 Kudos

Hi ,

Thanks for your help, But I am a bit confused here:

1). If I am populating the duration as PT8H , and with the calendar to be used has timing of 8 hours per      day , from 0800 to 1600 hours.

     What should be the value to be passed in duration field so as to get the correct output.

    Say for example if my ticket creation time is 1400 hours and I want a KUT field to be populated           which say 8 working hours from ticket creation time , than that should be 1400 hours of next                working day??

2). Now I am able to pass the timezone correctly as UTC.

BR'

Daljeet

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Daljeet,

The duration "PT8H" looks good inmy eyes.

Bye,

    Horst

DALJEET
Participant
0 Kudos

Hello ,

But the result is wierd  , its give me the normal 24 hours a day , and not the required result.

BR'

Daljeet

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Daljeet,

You're right. My tests showed the same.

In my eyes it makes no sense to have business hours in a working day calendar, but the docu speaks a different language.

Let me check if I can clarify that internally.

Stay tuned,

    Horst

DALJEET
Participant
0 Kudos

Hi ,

Yes , porbably the SAP document and the example explaination is wrong, and needs an update.

We have created the time Utility now , using the date it becomes DateTime utility, in our requirement.

Br'

Daljeet

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Daljeet,

I've debugged a little bit around.

There are DateTime classes which should be capable to handle also working hours per day.

I believe there are some settings missing in your (and mine, but this is an internal ) tenant.

Therefore I suggest that you raise an incident at the component AP-RC-DT to haved the calendar & DateTime settings checked.

Sorry,

    Horst

DALJEET
Participant
0 Kudos

I did raise a ticket last week , that too high priority , but no response yet .

Answers (2)

Answers (2)

DALJEET
Participant
0 Kudos

..can you help here please??

sunil1101
Advisor
Advisor
0 Kudos

Hi

calender schema EST time zone and results is coming in UTC time zone (EST+4 hr).

Regards

Sunil

DALJEET
Participant
0 Kudos

Hi Sunil ,

The calendar schema is also in UTC , an not in EST.