Here is a snip from the DecodeDate, DecodeTime help file example
procedure TForm1.Button1Click(Sender: TObject);
var
Present: TDateTime;
Year, Month, Day, Hour, Min, Sec, MSec: Word;
begin
Present:= Now;
DecodeDate(Present, Year, Month, Day);
Label1.Caption := 'Today is Day ' + IntToStr(Day) + ' of Month '
+ IntToStr(Month) + ' of Year ' + IntToStr(Year);
DecodeTime(Present, Hour, Min, Sec, MSec);
Label2.Caption := 'The time is Minute ' + IntToStr(Min) + ' of Hour '
+ IntToStr(Hour);
end;
Vrijwillige Bloemendaalse Reddingsbrigade wrote in message
<76j6ie$g55$1...@news.news-service.com>...
Label1.Caption := FormatDateTime(mask, date)
where mask is format mask for data representation (it's quite flexible and
you're
not bounded to one particular format) and date is value of TDateTime type.
See help on this function for further details.
Hope it helps.
Regards,
Sergey.
Vrijwillige Bloemendaalse Reddingsbrigade <In...@vbr.vuurwerk.nl> wrote in
message 76j6ie$g55$1...@news.news-service.com...
label1.Caption := FormatDateTime('MM-DD-YYYY',Date);
********************************
Michael Glatz
glatz...@aol.com
mgl...@briefcase.com
Yours
Didier, PARIS, France
Hw 'bout: Label1.Caption:=FormatDateTime('mm-dd-yyyy', Date);
It's easier to use FormatDateTime:
Label1.Caption := FormatDateTime('dd-mm-yyyy', Date);
--
Russell Anscomb