How to make a Clock based on a single Variable

Hi, I want to create a clock, which is based on an integer variable (if the integer 61 is the clock to show 1:01 clock) I want the integer memory and so must really completely based on this variable. Do somebody know a way without puting all the time a Branch? Thanks for Answers

minute = time % 60

hour = ( time / 60 ) % 24

day = ( time / 1440 )

As long as everything is an int, and time is in minutes, this should be fine.

1440 is the number of minutes in a day.

% means mod.

UE4 has timespan struct which let easily compute time and use it to format time display. First convert seconds to timespan (it’s float but you can cast integer to float)

And then use those nodes to do whatever you like:

It still not 1 node to do so (you still need to construct string from timespan elements), but it should be smaller then computing time from single integer. In C++ there actually one function for that, sadly it not avable in blueprint is seems:

You can try to bind it if you got C++ project