I use delphi 4 and would like to make use of daysbetween() function but I cannot find dateutils. Where is dateUtils?
can someone pls put me out of my misery? as in tell me where to find it.
Thanks in advance,
yomyom.
I think DateUtils showed up in Delphi 6. If I remember the other thread correctly, you wanted to do some date math. Since the TDateTime is a double, with integer representing a day, I'm pretty sure you can do what you want like this:
Trunc(Date1) - Trunc(Date2)
The code from Dateutils for daysbetween boils down to this(ANow and AThen are TDateTime parameters):
if ANow < AThen then
Result := AThen - ANow
else
Result := ANow - AThen;
result := trunc(result);
Brian
"There are 2 kinds of people in the world, those that divide people into two groups and those that don't. I belong to the second group." - tag line I stole
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.