Count days between 2 dates (calendar)

Hi Folks.
Does anyone have the formula for Count days between 2 dates (calendar)?
If I understand correctly, it is not possible to do it with blueprint.

This is a function that already exists on the internet, searching for C++ code in other systems… But I’m a beginner in C++ for Unreal, but I couldn’t convert and even trying I got stuck when converting data to float.

I already have a calendar system, so the function would have 2 date entries (example 01/01/2000 and 01/03/2001 as the excel datadif).

I really appreciate the help.
Thanks!

As far as I know, you can use DateTime and Timespan for that task.

Unfortunately, right now you can’t substract DateTime’s from each other in Blueprints, node for that is broken (Unreal Engine Issues and Bug Tracker (UE-135466)).

But you can easily do that in C++:

image

image

image

1 Like

owwww, thank you so much!

1 Like