How to compare two dates? (How to set an Expiration date)

Hi all!

I would want to ask you for the best way to compare two dates inside Unreal, please.

The objetive is to set one date into a variable and compare the current actual date, to know if that initial date is more recent or older than the current time (date).

Summary: I wan’t to stablish an expiration date for my application.

Thank you so much!!

Look into DateTime. This will expire for me in about 5 mins:

4 Likes

Oh, thank you so much @Everynone ! I didn’t think about those math symbols working with time structures :slight_smile:

I would want to ask you an additional question, please: any idea about getting the date from the internet? (Currently, expiration date can be bypassed changing the SO date)

Thank you!

Honestly, I do not know but as soon as I start searching, I get results:

With enough digging, I am almost sure you can find it. Or try marketplace plugins. Or wait until someone more knowledgeable chips in!

1 Like

Thank you again @Everynone ,

Certainly I didn’t search for it. I just asked because of the adrenalin replying the previous post. (Not as the first question, which I tried to find in Google, of course).

Don’t worry. The main and most important part is already achieved with your advice.

Thanks!

1 Like

I would probably put up a custom server (php, c#, java whatever you are comfortable with) and expose the date via an api through JSON. (just do an encoding of current datetime with the needed daylight saving + - x hours depending on time zone)

You could go with a free service but if it’s critical for license expiration etc
then I wouldn’t recommend it.

1 Like

Thank you @3dRaven !

Currently testing with one of the free and working fine, with the help of the plugin VaRest too.

Thanks! :slight_smile:

2 Likes