function DayOfWeek(Date: TDateTime): Integer;
Retorna o dia da semana especificado entre 1 e 7, onde domigo é um e Sábado é 7
procedure TForm1.Button1Click(Sender: TObject);
var
ADate: TDateTime;
begin
ADate := StrToDate(Edit1.Text);
Label1.Caption := Day + IntToStr(DayOfWeek(ADate)) + of the week;
end;
procedure DecodeDate(Date: TDateTime; var Year, Month, Day: Word);
Quebra os valores especificados no parâmetro Date em Year, Month e Day.
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;
procedure DecodeTime(Time: TDateTime; var Hour, Min, Sec, MSec: Word);
Quebra os valores especificados em Time nos par6ametros Hour, Min, Sec e MSec.
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;
procedure Delete(var S: string; Index, Count:Integer);
Remove a substring de Count caracters da string S partir da posição Index
var
s: string;
begin
s := Honest Abe Lincoln;
Delete(s,8,4);
Canvas.TextOut(10, 10, s);	{ Honest Lincoln }
end;
function DeleteFile(const FileName: string): Boolean;
Apaga o arquivo FileName do disco. Se o arquivo não puder ser apagado a função retorna False.
DeleteFile(DELETE.ME);
function DirectoryExists(Name: string): Boolean;
Verifica se Name diretorio existe
function DiskFree(Drive: Byte): Integer;
Retorna o número de bytes livre no driver especificado em Drive.
Onde : 0 = Corrente, 1 = A, 2 = B,...
DiskFree retorna –1 se o driver for inválido
var
S: string;
begin
S := IntToStr(DiskFree(0) div 1024) + Kbytes free.;
Canvas.TextOut(10, 10, S);
end;