# Difference between DateTime and Timespan?

**URL:** <https://forums.unrealengine.com/t/difference-between-datetime-and-timespan/414718>\
**Category:** Blueprint\
**Tags:** time, unreal-engine, Blueprint, question\
**Created:** [January 16, 2018, 5:31pm UTC](https://forums.unrealengine.com/t/difference-between-datetime-and-timespan/414718 "2018-01-16T17:31:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_b885638c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b885638c](https://forums.unrealengine.com/u/anonymous_user_b885638c)\
**Post date:** [January 16, 2018, 5:31pm UTC](https://forums.unrealengine.com/t/difference-between-datetime-and-timespan/414718/1 "2018-01-16T17:31:53Z")

</div>

I can do anything I need with DateTime, is Timespan some kind of a shortcut. I know it returns the same thing as Date. Anyone got an explanation?

---

<div class="post-metadata">

**Author:** ![xlar8or](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/xlar8or/32/710746_2.png) [@xlar8or](https://forums.unrealengine.com/u/xlar8or)\
**Post date:** [January 16, 2018, 5:44pm UTC](https://forums.unrealengine.com/t/difference-between-datetime-and-timespan/414718/2 "2018-01-16T17:44:06Z")

</div>

Hey there, my guess is that DateTime is used to hold full dates and Timespan is used to hold a chunk of time. From a DateTime you can only add TimeSpans and not DateTimes. So i would say it’s better to use Timespans if you want to add or subtract a chunk of time from a specific date using DateTime.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b885638c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b885638c](https://forums.unrealengine.com/u/anonymous_user_b885638c)\
**Post date:** [January 16, 2018, 5:51pm UTC](https://forums.unrealengine.com/t/difference-between-datetime-and-timespan/414718/3 "2018-01-16T17:51:27Z")

</div>

I figured it out. Timespan can get you total things. For example if you have 30 days, you can get them in minutes, seconds etc. DateTime can do the same thing, but unlike DateTime, Timespan can convert time units pretty easily, going from minutets to years and vice versa. At least that’s what I got from some testing.

Tx for the insight nonetheless.

---

<div class="post-metadata">

**Author:** ![gmpreussner\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@gmpreussner\_1](https://forums.unrealengine.com/u/gmpreussner_1)\
**Post date:** [January 17, 2018, 3:55pm UTC](https://forums.unrealengine.com/t/difference-between-datetime-and-timespan/414718/4 "2018-01-17T15:55:09Z")

</div>

_FDateTime_ stores a date and time, i.e. a point in time on a calendar and wall clock.

_FTimespan_ stores a duration.

The difference between two _FDateTime_ values is an _FTimespan_.

---

<div class="post-metadata">

**Author:** ![mahlukat](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mahlukat](https://forums.unrealengine.com/u/mahlukat)\
**Post date:** [October 7, 2023, 4:29pm UTC](https://forums.unrealengine.com/t/difference-between-datetime-and-timespan/414718/5 "2023-10-07T16:29:32Z")

</div>

Thank you thats a great explanation
