Re: finding the day of the year



JRS: In article <UVNFe.3942$PL5.367940@xxxxxxxxxxxxxxx>, dated Thu, 28
Jul 2005 03:40:37, seen in news:alt.comp.lang.borland-delphi, anthony
<mrmclarge@xxxxxxxxxxx> posted :

>Doews anyone know how I can find the day of the year. If I select a date
>with datepicker how can I then set about finding what number day of the
>year it is
>
>eg: 1/1/2005 would be day 1
>eg: 12/31/whatever year would be day 365 or 366 depending if it is a
>leap year.


DT := EncodeDate(Y, M, D) *OR* DecodeDate(DT, Y, M, D) ;
Answer := DT - EncodeDate(Y, 1, 1) + 1 ;

May be in <URL:http://www.merlyn.demon.co.uk/programs/dateprox.pas>.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/> - see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.
.



Relevant Pages

  • Re: finding the day of the year
    ... >Doews anyone know how I can find the day of the year. ... >with datepicker how can I then set about finding what number day of the ... See the DayOfTheYear function ... Prev by Date: ...
    (alt.comp.lang.borland-delphi)
  • Re: finding the day of the year
    ... > Doews anyone know how I can find the day of the year. ... > with datepicker how can I then set about finding what number day of the ... DecodeDate (aDate, yr, mth, day); ... Prev by Date: ...
    (alt.comp.lang.borland-delphi)
  • Re: How to insert date using a pop up calendar control in a cell i
    ... The ms datepicker is part of the ms common controls ocx ... usually found in the windows\system or windows\system32 folder. ... Prev by Date: ...
    (microsoft.public.excel.misc)
  • finding the day of the year
    ... Doews anyone know how I can find the day of the year. ... If I select a date with datepicker how can I then set about finding what number day of the year it is ... I have had this code somewhere, but with disk crashes etc I no longer have it ... Anthony ...
    (alt.comp.lang.borland-delphi)
  • Re: datepicker
    ... > How can I pick up the date the the user selects using datepicker? ... There is a simplified DatePicker form on our website on the ... 'Recover' - top rated FoxPro file repair utility. ... Prev by Date: ...
    (microsoft.public.fox.helpwanted)