Re: Week Number to Calendar
- From: alanglloyd@xxxxxxx
- Date: 25 Aug 2005 11:03:56 -0700
Did you know that you can readily change the format of the displayed
date by sending a message to the component ...
uses
CommCtrl;
DateTimePicker1.Perform(DTM_SETFORMAT, 0,
integer(PChar('dd/MM/yyyy'))); // m == minutes, M == month
The formatting characters follow typical Excel formatting and you can
place any non-formatting text in double-quotes.
So if you calculated the week no when the DTP opened and when it
changed, you could incorporate that into the formatting string and have
the week no _and_ the date displayed in the datetimepicker.
weekNoStr := 'Week No : ' + IntToStr(WeekNo);
DateTimePicker1.Perform(DTM_SETFORMAT, 0, integer(PChar('ddd d MMM yyyy
"' + WeekNoStr + '"')));
Which would give you ...
Thu 25 Aug 2005 Week No : 34
Alan Lloyd
.
- References:
- Week Number to Calendar
- From: UN
- Re: Week Number to Calendar
- From: UN
- Week Number to Calendar
- Prev by Date: Re: Looping thru components
- Next by Date: Dev-C++ Needs Delphi Programmers
- Previous by thread: Re: Week Number to Calendar
- Next by thread: Re: Week Number to Calendar
- Index(es):
Relevant Pages
|