0

I am using Delphi 5
I wish to do date/time calcs

I have noticed now that I require the 'DateUtils' unit
in order to use Functions such as IncMinute

What are my options to get a copy of 'DateUtils' unit for Delphi 5
Is it downloaded, free, or what?

Please help?

Regards,
Gerhard

2
Contributors
2
Replies
5
Views
9 Years
Discussion Span
Last Post by gerhardjl
0

Here's a link all about it:
Tutorial: Handling Dates and Time in Delphi.

For D5 all the date-time stuff is in the System unit. The DateUtils unit first appeared in D6. While there are some extra-friendly functions there, it isn't anything you really can't do without.

You can either write your own routines to make up the difference, or I'm sure that if you search the web you can find the DateUtils.pas unit.

Things like IncMinute are really simple. For example:

function IncMinute(
  const aDateTime:        tDateTime;
  const aNumberOfMinutes: int64
  ):                      tDateTime;
  begin
  result := ((aDateTime *MinsPerDay) +aNumberOfMinutes) /MinsPerDay
  end;

Where MinsPerDay = MSecsPerDay *60 *60; Hope this helps.
Good luck.

0

Thanks everyone for feedback re DateUtils
I realise now that I require D6 in order to make use of the extensive date/time utils as in DateUtils.
Bummer! I only have D6.... at this time
Regards,
Gerhard

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.