# Adding timespan to date time not working

**URL:** <https://forums.unrealengine.com/t/adding-timespan-to-date-time-not-working/256329>\
**Category:** Blueprint\
**Tags:** unreal-engine, UE5-0, Blueprint\
**Created:** [October 18, 2021, 3:57am UTC](https://forums.unrealengine.com/t/adding-timespan-to-date-time-not-working/256329 "2021-10-18T03:57:24Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![kybakk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kybakk](https://forums.unrealengine.com/u/kybakk)\
**Post date:** [October 18, 2021, 3:57am UTC](https://forums.unrealengine.com/t/adding-timespan-to-date-time-not-working/256329/1 "2021-10-18T03:57:24Z")

</div>

Trying to add a date/time and a timespan with the DateTime + Timespan node per the documentation.

> **[DateTime + Timespan](https://docs.unrealengine.com/4.27/en-US/BlueprintAPI/Math/DateTime/DateTime_Timespan/)**
>
> DateTime + Timespan

 ![date-time](https://d3kjluh73b9h9o.cloudfront.net/original/3X/9/f/9f91e178a50afd58ff5bbbbb89d878600e62303c.png)

When I connect a timespan value into the B pin of the addition node, Unreal automatically converts the node into a Timespan + Timespan node.

![bp](https://d3kjluh73b9h9o.cloudfront.net/original/3X/a/1/a1868dbadf19014ddefe785a5457ecdef177a147.png)

I assume this is a UE5 bug. If so, is there any way I can turn off this auto-conversion until it’s fixed? Or perhaps I am just doing something wrong?

---

<div class="post-metadata">

**Author:** ![Scott3730](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Scott3730](https://forums.unrealengine.com/u/Scott3730)\
**Post date:** [November 1, 2021, 4:39pm UTC](https://forums.unrealengine.com/t/adding-timespan-to-date-time-not-working/256329/2 "2021-11-01T16:39:05Z")

</div>

I’m having this exact issue. UE5.0\_EA

---

<div class="post-metadata">

**Author:** ![Temka1193](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Temka1193](https://forums.unrealengine.com/u/Temka1193)\
**Post date:** [March 22, 2022, 6:34am UTC](https://forums.unrealengine.com/t/adding-timespan-to-date-time-not-working/256329/3 "2022-03-22T06:34:02Z")

</div>

the problem still exists in UE5.0\_P2

---

<div class="post-metadata">

**Author:** ![Jackal22](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jackal22](https://forums.unrealengine.com/u/Jackal22)\
**Post date:** [March 31, 2022, 11:35pm UTC](https://forums.unrealengine.com/t/adding-timespan-to-date-time-not-working/256329/4 "2022-03-31T23:35:09Z")

</div>

I have tried to add a datetime to a datetime, it is not working as well. The convert pin menu is not opening for the input pins. If you add another input pin, there will be a datetime, a timespan and another datetime pin created, which can be connected to two datetimes. But shows error on compile.  
UE5 Preview2

P.S: Today I compiled an Editor from 5.0 branch, the problems still exist.

---

<div class="post-metadata">

**Author:** ![lucafixy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lucafixy](https://forums.unrealengine.com/u/lucafixy)\
**Post date:** [May 11, 2022, 7:40am UTC](https://forums.unrealengine.com/t/adding-timespan-to-date-time-not-working/256329/5 "2022-05-11T07:40:09Z")

</div>

Hi,

Here is a combination that could help:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/e/5/2e5ccc2021b4b3a5ded2c3e8694fb3e0071d3cbe.png)

Best

---

<div class="post-metadata">

**Author:** ![Moon\_PENG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Moon\_PENG](https://forums.unrealengine.com/u/Moon_PENG)\
**Post date:** [June 15, 2022, 6:20am UTC](https://forums.unrealengine.com/t/adding-timespan-to-date-time-not-working/256329/6 "2022-06-15T06:20:04Z")

</div>

FDateTime+FTimespan was able to work in C++  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/5/6/e56bb3fc782be25f13777bbd6a81531329a09b8e.png)

So I add a BlueprintFunctionLibrary function:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/e/7/fe746d44f53455a959f38ab0367d8c700b8e135e.png)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/b/3/2b3b42d93fc4fc79f62b31efbee13e1e5e375259.png)

---

<div class="post-metadata">

**Author:** ![alphabrox](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@alphabrox](https://forums.unrealengine.com/u/alphabrox)\
**Post date:** [September 28, 2022, 10:08pm UTC](https://forums.unrealengine.com/t/adding-timespan-to-date-time-not-working/256329/7 "2022-09-28T22:08:27Z")

</div>

still exists in UE 5.0.3

---

<div class="post-metadata">

**Author:** ![RhapidFyre](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rhapidfyre/32/581689_2.png) [@RhapidFyre](https://forums.unrealengine.com/u/RhapidFyre)\
**Post date:** [November 28, 2022, 6:32am UTC](https://forums.unrealengine.com/t/adding-timespan-to-date-time-not-working/256329/8 "2022-11-28T06:32:21Z")

</div>

Still exists in 5.1.0

---

<div class="post-metadata">

**Author:** ![Ferox](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ferox](https://forums.unrealengine.com/u/Ferox)\
**Post date:** [December 5, 2022, 3:28pm UTC](https://forums.unrealengine.com/t/adding-timespan-to-date-time-not-working/256329/9 "2022-12-05T15:28:15Z")

</div>

To add the seconds you can use that function in C++, with FTimespan methods.

FDateTime UTestFuncLib::AddSeconds(FDateTime StartFrom, int TimeToAdd)  
{  
FTimespan DataTimeTemp = FTimespan::FromSeconds(TimeToAdd);

```
return StartFrom + DataTimeTemp;

```

}

---

<div class="post-metadata">

**Author:** ![elbastosoyyo1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@elbastosoyyo1](https://forums.unrealengine.com/u/elbastosoyyo1)\
**Post date:** [April 19, 2023, 11:25am UTC](https://forums.unrealengine.com/t/adding-timespan-to-date-time-not-working/256329/10 "2023-04-19T11:25:43Z")

</div>

I tried this today and it worked good for me, simply connecting the the Date Time Struct and using the split struct in the other node.

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/d/d/fdd150e141fceb416c0106831305e01dc1a53763.jpeg)

---

<div class="post-metadata">

**Author:** ![MisterPixel](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/misterpixel/32/629747_2.png) [@MisterPixel](https://forums.unrealengine.com/u/MisterPixel)\
**Post date:** [July 27, 2023, 8:56pm UTC](https://forums.unrealengine.com/t/adding-timespan-to-date-time-not-working/256329/11 "2023-07-27T20:56:24Z")

</div>

Still happening in UE 5.2.1 ☹ I found some doc page from UE 4.27 and it seems that there **was** a [DateTime + Timespan node](https://docs.unrealengine.com/4.27/en-US/BlueprintAPI/Math/DateTime/DateTime_Timespan/) allowing you to add a timespan on top of a datetime (which sounds logical, as timespans not being able to offset datetimes are pretty useless by their own), but apparently that node is nowhere to be found in UE5 docs…

---

<div class="post-metadata">

**Author:** ![Adder1812](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Adder1812](https://forums.unrealengine.com/u/Adder1812)\
**Post date:** [August 13, 2023, 9:16am UTC](https://forums.unrealengine.com/t/adding-timespan-to-date-time-not-working/256329/12 "2023-08-13T09:16:14Z")

</div>

i have noticed that we can copy this node from ue4 and it works 😃

 ![obraz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/1/0/9100363082ad3bd0f0fe00dc70742d476253a969.png)

---

<div class="post-metadata">

**Author:** ![RickSchwartze](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RickSchwartze](https://forums.unrealengine.com/u/RickSchwartze)\
**Post date:** [August 17, 2023, 4:53am UTC](https://forums.unrealengine.com/t/adding-timespan-to-date-time-not-working/256329/13 "2023-08-17T04:53:06Z")

</div>

Copying over from UE4 worked for me too, thanks so much 🙂

---

<div class="post-metadata">

**Author:** ![Adder1812](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Adder1812](https://forums.unrealengine.com/u/Adder1812)\
**Post date:** [August 17, 2023, 6:29am UTC](https://forums.unrealengine.com/t/adding-timespan-to-date-time-not-working/256329/14 "2023-08-17T06:29:18Z")

</div>

np 😃

---

<div class="post-metadata">

**Author:** ![QuiteDan1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/quitedan1/32/732176_2.png) [@QuiteDan1](https://forums.unrealengine.com/u/QuiteDan1)\
**Post date:** [March 30, 2024, 7:52am UTC](https://forums.unrealengine.com/t/adding-timespan-to-date-time-not-working/256329/15 "2024-03-30T07:52:00Z")

</div>

![DateTimeIssue](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/9/b/79bcad8eb6c568a1e50d23ef0aaa360294ff8d6a.png)  
This worked for me in 5.2  
Thanks, reddit user dustinin!

---

<div class="post-metadata">

**Author:** ![Tegurd](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tegurd](https://forums.unrealengine.com/u/Tegurd)\
**Post date:** [June 4, 2024, 8:34pm UTC](https://forums.unrealengine.com/t/adding-timespan-to-date-time-not-working/256329/16 "2024-06-04T20:34:36Z")

</div>

Still a problem for me in 5.3.2. Dustini’s advice didn’t help me I’m afraid.  
Edit: Found a workaround by converting everything to seconds and adding it up. Here’s how it looks if it helps anyone

 ![Skärmbild 2024-06-04 224221](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/0/a/90a62e9e230b0da78d7882c8cda0596e3995f5bb.png)
