Re: finding the day of the year
- From: Dr John Stockton <jrs@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 27 Jul 2005 22:42:17 +0100
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.
.
- References:
- finding the day of the year
- From: anthony
- finding the day of the year
- Prev by Date: Re: finding the day of the year
- Next by Date: Re: finding the day of the year
- Previous by thread: Re: finding the day of the year
- Next by thread: Disable TListBox Redraw...
- Index(es):
Relevant Pages
|