# Date/Time format for Relative actual time calculation

**URL:** <https://forum.certara.com/t/date-time-format-for-relative-actual-time-calculation/3416>\
**Category:** Phoenix WNL basics\
**Created:** [June 15, 2019, 7:51am UTC](https://forum.certara.com/t/date-time-format-for-relative-actual-time-calculation/3416 "2019-06-15T07:51:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nsilva](https://avatars.discourse-cdn.com/v4/letter/n/3bc359/32.png) [@nsilva](https://forum.certara.com/u/nsilva)\
**Post date:** [June 15, 2019, 7:51am UTC](https://forum.certara.com/t/date-time-format-for-relative-actual-time-calculation/3416/1 "2019-06-15T07:51:03Z")

</div>

Dear all  
I pretend to calculate the actual time of a blood sampling in relation to dosing Date/Time.  
Data example:  
Dosing: 2018-12-25 07:00  
Blood sampling: 2018-12-26 19:00  
How can I do this calculation. I have tried several approaches without result!  
Rgds

---

<div class="post-metadata">

**Author:** ![fmanera](https://avatars.discourse-cdn.com/v4/letter/f/b3f665/32.png) [@fmanera](https://forum.certara.com/u/fmanera)\
**Post date:** [June 17, 2019, 7:05am UTC](https://forum.certara.com/t/date-time-format-for-relative-actual-time-calculation/3416/2 "2019-06-17T07:05:49Z")

</div>

Dear Nuno,

You can copy and paste dosing date&time and sampling dosing&time in a Excel spreadsheet. In a third cell apply this formula (sampling&time cell - dosing&time cell). Finally copy and paste the column “actual time” in Phoenix.  
Hope you find it usefull.  
Best regards  
Francesco

---

<div class="post-metadata">

**Author:** ![nsilva](https://avatars.discourse-cdn.com/v4/letter/n/3bc359/32.png) [@nsilva](https://forum.certara.com/u/nsilva)\
**Post date:** [June 17, 2019, 8:06am UTC](https://forum.certara.com/t/date-time-format-for-relative-actual-time-calculation/3416/3 "2019-06-17T08:06:05Z")

</div>

> [@fmanera](#):
>
> Dear Nuno,
> 
> You can copy and paste dosing date&time and sampling dosing&time in a Excel spreadsheet. In a third cell apply this formula (sampling&time cell - dosing&time cell). Finally copy and paste the column “actual time” in Phoenix.  
> Hope you find it usefull.  
> Best regards  
> Francesco

Dear Francesco

Thank you for your suggestion. That is the easiest way. However, from a Quality Control and tracebility of the data transformation, you should not use copy/paste to excel and back again to Phoenix. All the transformations should be ideally performed in Phoenix.

We will wait for other suggestions. I’ve also posted a ticket in Certara support. So, if a solution comes from it, I’ll post it.

Nevertheless, thanks for your input!

Rgds

---

<div class="post-metadata">

**Author:** ![SimonDavis](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@SimonDavis](https://forum.certara.com/u/SimonDavis)\
**Post date:** [June 17, 2019, 4:24pm UTC](https://forum.certara.com/t/date-time-format-for-relative-actual-time-calculation/3416/4 "2019-06-17T16:24:07Z")

</div>

Dear Nuno, here is a worked example that shows how to parse your datetime values for calculation. I hope this helps

Simon

[DataManipulation.phxproj](https://forum.certara.com/uploads/short-url/7zQzGMlLZ9ePOsGQI8GUEIog5E4.phxproj) (239 KB)
