# Difference in hours function not giving the result in report definition

**URL:** <https://forums.pega.com/t/difference-in-hours-function-not-giving-the-result-in-report-definition/5392>\
**Category:** User Experience\
**Tags:** java-and-activities, reporting, user-experience, pega-platform\
**Created:** [November 14, 2023, 2:13pm UTC](https://forums.pega.com/t/difference-in-hours-function-not-giving-the-result-in-report-definition/5392 "2023-11-14T14:13:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohamed\_Siddiq\_N](https://avatars.discourse-cdn.com/v4/letter/m/e9a140/32.png) [@Mohamed\_Siddiq\_N](https://forums.pega.com/u/Mohamed_Siddiq_N)\
**Post date:** [November 14, 2023, 2:13pm UTC](https://forums.pega.com/t/difference-in-hours-function-not-giving-the-result-in-report-definition/5392/1 "2023-11-14T14:13:30Z")

</div>

I need to calculate the hours between pxupdateDateTime and CurrentDateTime.

i used Diffrence in hours function in report.

But Its not providing the results.

Can anyone please advise me ?

---

<div class="post-metadata">

**Author:** ![Mohammad\_Ravoof](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/mohammad_ravoof/32/6314_2.png) [@Mohammad\_Ravoof](https://forums.pega.com/u/Mohammad_Ravoof)\
**Post date:** [November 15, 2023, 4:57am UTC](https://forums.pega.com/t/difference-in-hours-function-not-giving-the-result-in-report-definition/5392/2 "2023-11-15T04:57:59Z")

</div>

Hi @Mohameds3992 ,

I have used “The difference in hours between” function in Report definition order to achieve this requirement. I have attached the screenshots for your quick reference. Please let me know if you have any issues.

Thanks,

Ravoof.

 ![TestDataType.png](https://pega1.discourse-cdn.com/pega/original/2X/9/91fa385d2bca390fb88e72f616777d6e59e89cf6.png)

 ![TestResults.png](https://pega1.discourse-cdn.com/pega/original/2X/a/a3a0f927be1ccdfc60c8bcc0751067b60a0a0075.png)

 ![Implementation-1.png](https://pega1.discourse-cdn.com/pega/original/2X/3/32ba926a168d916c9b01dc5368a59ff93cfb7ab2.png)

 ![Implementation 2.png](https://pega1.discourse-cdn.com/pega/original/2X/c/c69ddec36a4f9503a4ac22bf146a1e7bacc401b7.png)

---

<div class="post-metadata">

**Author:** ![Mohamed\_Siddiq\_N](https://avatars.discourse-cdn.com/v4/letter/m/e9a140/32.png) [@Mohamed\_Siddiq\_N](https://forums.pega.com/u/Mohamed_Siddiq_N)\
**Post date:** [December 19, 2023, 1:41pm UTC](https://forums.pega.com/t/difference-in-hours-function-not-giving-the-result-in-report-definition/5392/3 "2023-12-19T13:41:48Z")

</div>

@Mohammad Ravoof.Thanks for your reply. Its worked for me
