?
Solved

how to program a time span calculator in delphi?

Posted on 2003-03-26
4
Medium Priority
?
1,059 Views
Last Modified: 2012-06-21
The program is required to readdata from a text file.For each record in the file,calculate the time leapsed(in years and days) between the start and end days.consider leap years

The earliest valid date will be Jan 1, 1900, and the latest
valid date will be December 31, 2100.

how do i program this in delphi7?
please help..its urgent
0
Comment
Question by:rati7
[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
4 Comments
 

Author Comment

by:rati7
ID: 8213766
its urgent please..
0
 
LVL 2

Accepted Solution

by:
Griffon earned 200 total points
ID: 8219039
what exactly dont you know how to do? you read from the text file using 'Assignfile'(to assign file) and 'readln'(to get the line first to last).

then just do a string to datetime conversion and subtract one date from the other..

this will leave you with an value if read as an integer that will be equal to the number of days between the two dates. And I would have thought the number of days would be more use than anything else as the number of months or years would be inconclusive due to their varying lengths.

Hope this is of help

Griffon.
0
 

Expert Comment

by:CleanupPing
ID: 9446746
rati7:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
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

Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Introduction to Processes
Suggested Courses

777 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