How do I set members in Date Time Struct in c++?

Title.

Hi makkelijkenaam12,

You construct the FDateTime with your values or build it from a string with the Parse method, or set it to “Now”.

If you look in the source code, you’ll see that it’s all stored by the “Ticks” variable (int64) that contains the number of Ticks since Jan 1st 0001. There aren’t actually variables for month,day, year etc…

image
so i can’t set the hour of the fdatetime variable thetime +1?

Check out the FTimeSpan class - you can do arithmetic with that an a FDateTime:

1 Like

I’ll take a look at it, thank you.

1 Like


so i tried this but it says reference to local variable of enclosing function is not allowed at every variable i put into that datetime.

lol i had to do was add a timespan to it like you said recoursedesign, thank you very much!
image

1 Like