Re: finding the day of the year



On Thu, 28 Jul 2005 08:24:26 +1200, anthony <mrmclarge@xxxxxxxxxxx>
wrote:

>forgive me for being a bit dumb here, yes I have found the function and
>even found how to call it, I think this right
>DayOfTheYear(datetimepicker1.date); how do I get the result, where do I
>find that, Thank you for all your effort, I dont mean to bother you all
>but it's how I learn

uses controls, { for tDate}
DateUtils; { for DayOfTheYear }

var ThisDate : tDate; // or tDateTime


Then call DayOfTheYear(ThisDate) where ThisDate is the date you are
working with. The function returns an integer giving the day number
of the year (and it is correct for leap years, etc).

I think the DateUtils unit is only in Delphi 6 and later, but I'm not
certain about that.

---
Replace you know what by j to email
.



Relevant Pages

  • Re: finding the day of the year
    ... > It is in the DateUtils unit in my D6 pro. ... > the earliest versions of Delphi. ... Prev by Date: ...
    (alt.comp.lang.borland-delphi)
  • Re: finding the day of the year
    ... forgive me for being a bit dumb here, yes I have found the function and even found how to call it, I think this right DayOfTheYear; how do I get the result, where do I find that, Thank you for all your effort, I dont mean to bother you all but it's how I learn ... That's strange, the DayOfTheYear function is in my D6 pro, in the ... DateUtils unit, so it should be in Enterprise. ... to get the first day of the year, subtract ...
    (alt.comp.lang.borland-delphi)
  • Re: finding the day of the year
    ... >> See the DayOfTheYear function ... >In which unit of which Delphi version should this be contained? ... It is in the DateUtils unit in my D6 pro. ...
    (alt.comp.lang.borland-delphi)
  • Re: finding the day of the year
    ... Jud McCranie wrote: ... It is in the DateUtils unit in my D6 pro. ... the earliest versions of Delphi. ...
    (alt.comp.lang.borland-delphi)