Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Fifference

Status
Not open for further replies.

davman2002

Programmer
Nov 4, 2002
75
0
0
US
Does Borland have a Date Difference function? If Yes can you provide an example?
 
If you are using Builder you have Pascal data/time functions that will allow subtract dates.
Code:
TDateTime One, Two;
One = Now(); // The current date/time
Two = One - 3 // Two now has the date three days ago.
You can subtract another date or a double (fraction represents a fraction of a day). There are numerous TDateTime functions. Look at the help files for a listing. James P. Cottingham

When a man sits with a pretty girl for an hour, it seems like a minute. But let him sit on a hot stove for a minute and it's longer than any hour. That's relativity.
[tab][tab]Albert Einstein explaining his Theory of Relativity to a group of journalists.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top