Is there any way to retrieve the most recent DateTime?

Hello all,

I’m building a save system with Blueprints and I’m trying to find a way to retrieve the most recent date of a save slot in order to load from a “Continue” button.

I’m storing the date & time of my save in the Save Structure when the player save.

In my Game Instance, when the game starts, I check whether saveslots exist or not, if they do, I store them in an array.
Then for each member of this array, I break the structure, retrieve the date of the save and store them in turn in another array. (See screenshot)

I thought I could get a “Find Max Value” for the DateTime array I built but I think it does not exist.

Am I missing something or do I have to do it myself with operators, checking which variable in the array is the highest ?

Thank you in advance for your help !


Get this:

It’s free and sort all kinds of arrays, including datetime.

Thanks ClockworkOcean ! I’ll get it ! :slight_smile:

Cheers !

Yeah it doesn’t look like there’s a find max value for DateTime. There’s a MaxValue node which returns the maximum value the DateTime variable could take, so the year 9999 etc. I’m not even sure in what context that would be useful, maybe someone can comment if they’ve used it. Since you can use operators on DateTime it shouldn’t be too much of a hassle. Maybe something like this:

I hope that helps!