Get current system time and date

How can I get the current system time and date?
I can´t seem to find a function for it and the link to the UE4 documentation just leads me to a 404 page.

Hi!

You can do this in two ways

1. Install plugin Victory.

Get Current Operating System Time

2. Or add C++ class

1 Like

That plugin is for Unreal Engine 4.7, but im already on 4.8.
And on the C++ class link, the link to docs.unrealengine doesn’t work, so I can’t look up the function.

Link

Download CURRENT version

I did, and it doesn’t work:

49502-bildschirmfoto+2015-07-08+um+15.26.18.png

I installed it like it says on the page.

Any idea why its not working?

Note that the above answer is now outdated. You can simply use the Blueprint node “Now” along with the built in “DateTime” nodes to achieve the results requested.

9 Likes

You sir, have won the day for me. It’s nice that there’s someone who enters old questions and updates them with new info. Good job :wink:

My thx !!!

And then you can use the asDate blueprint node to convert it to text, if needed.

The plugin is only available for the windows platform.

As previously stated, you can simply use the Blueprint node “Now” along with the built in “DateTime” nodes to achieve the results requested.

2 Likes

In C++ you can use FDateTime::Now().

For example, to get the current day of the year:

const int32 CurrentDay = FDateTime::Now().GetDayOfYear();

2 Likes

Computer Time Example

1 Like

You can use the Timespan and Date Time functions.

Aaagh, I just spent an hr writing a function do that! lol! Oh well! :o)