a branch based on on when an int changes?

Hey there,

So im having a problem rotating the time of day.

Ive tried assigning a 7 day week to dateTime, But every month it resets, so itll go wednesday 31st to monday 1st.

As the days rotate based on division of 7.

So now Im thinking maybe load the days like a revolver.

When day increases for any reason, add that many days to the revolving day cycle.

I just cant think of how to link it up.

I need basically a “When day changes, rotate Week day map array by 1”.

Anyway, Thanks for reading. Hopefully It makes sense.

Hi Skyboy,

You can use a Julian Day which is the number of days since 1/1/0001 - all you need to know is the day-of-week for that day (Which is Saturday).

Edit: I’ve been trying to find how to do this from blueprint but can’t find anything exposing the c++ GetJulianDay method linked above, to do it this way you may need to create a c++ method to call that and return it to your blueprint.

Edit again: Here’s a blueprint version:

1 Like


Thanks for the responses.

That link to “Get day of week” Works perfectly.

I cant think how in hell it works but it rotates through my map array perfectly.

I need to just sit and study this for a bit on how its doing what its doing maths wise.

Thanks again, I never would of come to this conclusion so this is a huge win and a bump to my understanding of DateTime.

Thanks :trophy: :trophy:

1 Like