Re: Week Number to Calendar



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

.



Relevant Pages

  • Re: confused constructing a regex
    ... > wibble = WOBBLE; ... However, I need to quote it properly, and despite ... Your regex removes the "formatting characters" before and after the non ...
    (comp.lang.perl.misc)
  • Re: removing visual format of spaces & paragraphs?!
    ... > formatting characters you're seeing can come in very handy at times, ... > you have to do to get rid of them is click again on the pilcrow symbol. ... see the paragraph characters at the end of paragraphs, ...
    (microsoft.public.mac.office.word)
  • RE: mac vs. windows word
    ... "John" wrote: ... a file to proof for her and the formatting was a total disaster. ... question is why is there a difference in formatting characters. ...
    (microsoft.public.word.docmanagement)
  • Re: Missing Shortcut
    ... Cmd (aka. the Apple key) + Shift + N will apply the Normal style to a ... Formatting Characters and Paragraphs" entry in Word's help window. ... What is the shortcut in Word 2004 for removing paragraph formatting. ...
    (microsoft.public.mac.office.word)