Como obter o mês de uma data?
1
2
3
4
5
6
7
8
9
10
11
| { É necessário declarar DateUtils,
em versões unicode declare System.DateUtils. }
// Função do Delphi: MonthOf( Data )
// Retorno: Inteiro( Integer )
// Exemplo
procedure TForm1.Button1Click(Sender: TObject);
begin
ShowMessage(IntToStr( MonthOf(EncodeDate(2008, 5, 15) ) ));
end; |
{ É necessário declarar DateUtils,
em versões unicode declare System.DateUtils. }
// Função do Delphi: MonthOf( Data )
// Retorno: Inteiro( Integer )
// Exemplo
procedure TForm1.Button1Click(Sender: TObject);
begin
ShowMessage(IntToStr( MonthOf(EncodeDate(2008, 5, 15) ) ));
end;
Post Views: 5.711
-
InfusTec
-
- 0 comentários
- 18 de março de 2015