Download

Can DateTime be advanced in code?

I’m looking at https://docs.unrealengine.com/latest/INT/API/Runtime/Core/Misc/FDateTime/index.html , and most of what it has is for retrieving data, not setting it- I’m trying to use FDateTime for my own in-game calendar system, so I’m wondering if there’s anything in the API that would allow me to add time to an existing struct, e.g. “What DateTime is the current DateTime + 3000 minutes”?

Take a look at the docs for the API:

FDateTime and FTimeSpan

By using FTimeSpan and FDateTime in conjunction with the overloaded operators… the answer is yes.

For instance FDateTime::Now() + FTimeSpan::FromSeconds(3);

Ooh timespan does it, thank you for the documentation! :slight_smile: