[fpc-pascal]date handling routines
Michael.VanCanneyt at Wisa.be
Michael.VanCanneyt at Wisa.be
Thu Aug 30 22:53:45 CEST 2001
On Thu, 30 Aug 2001 BigMatt19 at aol.com wrote:
> Hey guys,
> Wondering if there was already a unit available that could tell me the day of week a certain date was. An example perhaps would be:
>
> function GetDayOfWeek(date:datetimerecord):integer;
>
> where result would be 1-7 (depending on the date).
>
> If not, then I will just write my own, but why reinvent the wheel, eh?
The sysutils unit contains a function
function DayOfWeek(DateTime: TDateTime): integer;
You'll need to convert your date to TDateTime format, though.
The sysutils unit contains routines for this as well.
Michael.
More information about the fpc-pascal
mailing list