Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / creating an expiration date

Author
Message
making an expiration date
18
Years of Service
User Offline
Joined: 9th Jan 2006
Location:
Posted: 9th Jan 2006 17:04
I'm trying to put an expiration date in my program. I'd like to be able to read the current date (I can do that), compare it to a future date (the expiration date), and if the present date is after the expiration date, the program goes to a routine to say the program is expired and then closes upon pressing "enter".

stevor
Justin W
20
Years of Service
User Offline
Joined: 28th Apr 2004
Location: Vancouver, Canada
Posted: 9th Jan 2006 21:40
Hmmm it seems like you just answeared your own question. If you can get the current date then as you said just compare it to the experation date and if its greater then end the program.

Im guessing maybe your question has to do with how to compare 2 dates? Well just off the top of my head id say write a function that converts both months and years into days so that you can get the date in days then compare with greater then (>
UFO
19
Years of Service
User Offline
Joined: 11th Oct 2005
Location:
Posted: 9th Jan 2006 22:04
Huh, there are alot of new members that make their names related to the question, strange...

To compare them, use



Hippopotomonstrosesquippedaliophobia-Fear of long words
TKsFox
19
Years of Service
User Offline
Joined: 25th Nov 2005
Location: No no no - Its not the Cyberspace
Posted: 10th Jan 2006 13:41
XD - store the installation date or w/e the expiration date in the registry... Also the date when the app has been started the first time. Otherwise u can set ur system date b4 launching the app

It's me...

Login to post a reply

Server time is: 2024-11-27 07:29:13
Your offset time is: 2024-11-27 07:29:13