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.

DarkBASIC Professional Discussion / Counting down days?

Author
Message
Mugen Wizardry
User Banned
Posted: 11th Jan 2011 18:58
Hi all. I want to create an evaluation version (trial version) of my software I'm about to release, and would like to write the amount of days remaining til expiration of my product at a selected amount of days.

here's the code:



CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD AT Amazon.com!
sladeiw
17
Years of Service
User Offline
Joined: 16th May 2009
Location: UK
Posted: 12th Jan 2011 10:29
Should do the trick:
Needs matrix1 utils just for the mid$

Mugen Wizardry
User Banned
Posted: 12th Jan 2011 20:00 Edited at: 12th Jan 2011 20:06
how would I make it get today and make it so that the expiry date is 15 days from the day selected ALL the time? So that way i don't have to keep changing the expire date for each client.



basically, whatever date they download it is the start date, and 15 days from whenever they downloaded it, is the end date.

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD AT Amazon.com!
sladeiw
17
Years of Service
User Offline
Joined: 16th May 2009
Location: UK
Posted: 12th Jan 2011 20:41 Edited at: 12th Jan 2011 20:43
You would need to create a file or registry entry the first time it is run and store the expiry date there. Then each time it is run you can compare the stored date. How complex and hidden you make it is up to you

edit: btw month and day would never =0 so no real need to check that if using valid dates, always make sure you use full dbpro style dates: MM/DD/YY
Mugen Wizardry
User Banned
Posted: 12th Jan 2011 20:45
how would i do that?

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD AT Amazon.com!
sladeiw
17
Years of Service
User Offline
Joined: 16th May 2009
Location: UK
Posted: 12th Jan 2011 20:58 Edited at: 12th Jan 2011 21:05
Here you go, but to be honest if you have trouble coding a routine to read and write a variable to a file it may be difficult to convice people to buy your app.




edit: Before anyone else points it out there are 101 ways to circumvent something as simple and obvious as this
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 12th Jan 2011 20:58
Try doing some research...

My signature is NOT a moderator plaything! Stop changing it!
Mugen Wizardry
User Banned
Posted: 12th Jan 2011 22:13
Thanks! ^^

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD AT Amazon.com!
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 12th Jan 2011 23:27
Your welcome.

My signature is NOT a moderator plaything! Stop changing it!
sladeiw
17
Years of Service
User Offline
Joined: 16th May 2009
Location: UK
Posted: 13th Jan 2011 00:22
Quote: "Your welcome."


The cheek!

Login to post a reply

Server time is: 2026-07-21 15:13:28
Your offset time is: 2026-07-21 15:13:28