PDA

View Full Version : System Date



notlogan
08-28-2013, 12:40 PM
Is it possible to get the system date and abort the install if the system date is outside a given range?

linder
08-29-2013, 02:45 AM
Hello,

Yes, absolutely no problem. You have several completely different options to handle this. For example, the "Expiration Date Checking.sb8" example (part of the Examples Package). Perhaps this already helps? If not, let me know what you need and I can tell you how to do it.

Friedrich

notlogan
08-29-2013, 06:26 AM
I was trying something like that....but your example looks better for my purposes....however....

I did pretty much exactly what you did. My INSTALLERDATE gets set to 20130829 then my DATE_TODAY gets set to 2013/08/29. When it does the Julian conversion it converts DATE1 to 2456534 and DATE2 to 0.


As a side note - I can't do: Set Variable %INSTALLERDATE% to FUNCTION:Julian Day (%INSTALLERDATE%)? Just saving an additional variable.

notlogan
08-29-2013, 06:27 AM
OOOOPppppssssss...disregard previous reply....I found the missing format from my code.....D'OH

linder
08-29-2013, 06:29 AM
:)

Thanks for the update!

Friedrich

notlogan
08-29-2013, 07:06 AM
And it appears you CAN do: Set Variable %INSTALLERDATE% to FUNCTION:Julian Day (%INSTALLERDATE%)...must be my old FORTRAN training....saving a variable....

linder
08-29-2013, 07:19 AM
Looks good :)

Friedrich