Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Coutdown witch depends on date (like trial sw)

Posted on 1997-07-16
1
Medium Priority
?
164 Views
Last Modified: 2010-04-06
I would like to do same kind of thing, which is
on trial software (you have 30 days time to try it,
and the number is getting smaller every day you use it).
How do I do it? I have looked into date/time things, but
I have no idea how to do it! :( :( Gimme some help!

My english ain't so good and I'm very beginner in Delphi 2.

0
Comment
Question by:tonitop
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

by:
icampbe1 earned 400 total points
ID: 1338983
The first time the program is run, you call 'now'.  This returns the current date and time.  This you must save somewhere (thats up to you) in a TDateTime var.

VAR
   SaveDate: TDateTime;
BEGIN
   SaveDate := Now;  {Save this in a file or something}
END;

 When the program is next run, you retrieve the saved date back into SaveDate.  Then you can do this:

VAR
  DaysInUse: Integer;

DaysInUse := (Now - SaveDate) ;

This is a simple example of how you can do it.

Cheers,
Ian C.

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question