# How can I get current unix timestamp in seconds or milliseconds using blueprint?

**URL:** <https://forums.unrealengine.com/t/how-can-i-get-current-unix-timestamp-in-seconds-or-milliseconds-using-blueprint/1276215>\
**Category:** Blueprint\
**Tags:** unreal-engine, Blueprint, question\
**Created:** [August 29, 2023, 7:12am UTC](https://forums.unrealengine.com/t/how-can-i-get-current-unix-timestamp-in-seconds-or-milliseconds-using-blueprint/1276215 "2023-08-29T07:12:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![oneimperfectguy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@oneimperfectguy](https://forums.unrealengine.com/u/oneimperfectguy)\
**Post date:** [August 29, 2023, 7:12am UTC](https://forums.unrealengine.com/t/how-can-i-get-current-unix-timestamp-in-seconds-or-milliseconds-using-blueprint/1276215/1 "2023-08-29T07:12:34Z")

</div>

I want to get current unix timestamp to fetch data based on that but I can find no way to get current unix timestamp using blueprint. Can someone help?

---

<div class="post-metadata">

**Author:** ![Grot13](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/grot13/32/1008648_2.png) [@Grot13](https://forums.unrealengine.com/u/Grot13)\
**Post date:** [August 29, 2023, 8:59am UTC](https://forums.unrealengine.com/t/how-can-i-get-current-unix-timestamp-in-seconds-or-milliseconds-using-blueprint/1276215/2 "2023-08-29T08:59:31Z")

</div>

Search for “UTC now”, that is the node you are looking for.

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/d/2/0d2969d2cb04433f1013d02b79ae6e8860c0757d.png)

---

<div class="post-metadata">

**Author:** ![oneimperfectguy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@oneimperfectguy](https://forums.unrealengine.com/u/oneimperfectguy)\
**Post date:** [August 29, 2023, 10:57am UTC](https://forums.unrealengine.com/t/how-can-i-get-current-unix-timestamp-in-seconds-or-milliseconds-using-blueprint/1276215/3 "2023-08-29T10:57:39Z")

</div>

This gives the current UTC time on my computer. I want Unix timestamp which is the seconds happened after Unix Epoch (Jan 1, 1970).

I can subtract Jan 1, 1970 from UTC.Now but the DateTime-DateTime function is not available in UE5.

---

<div class="post-metadata">

**Author:** ![IrSoil](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@IrSoil](https://forums.unrealengine.com/u/IrSoil)\
**Post date:** [August 29, 2023, 2:54pm UTC](https://forums.unrealengine.com/t/how-can-i-get-current-unix-timestamp-in-seconds-or-milliseconds-using-blueprint/1276215/4 "2023-08-29T14:54:34Z")

</div>

> DateTime-DateTime function is not available in UE5.

It was broken from 5.0 to 5.2, but it’s there in 5.3. If upgrading engine is not an option - [someone also reported](https://forums.unrealengine.com/t/calculating-accurate-time-difference-across-months-for-coin-farming/1267642/3) that you can just copypaste this node from other engine version and it should work.

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [September 28, 2023, 2:55pm UTC](https://forums.unrealengine.com/t/how-can-i-get-current-unix-timestamp-in-seconds-or-milliseconds-using-blueprint/1276215/5 "2023-09-28T14:55:00Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
