Funções com data

Delphi

08/06/2004

Pessoal

Como funcionam as funções DayOfTheMonthe e DayOfTheWeek


Zunker

Zunker

Curtidas 0

Respostas

Xanatos

Xanatos

08/06/2004

Bom uma retorna o dia da semana e a outra o dia do mes!

Voce pega um dado tipo data e recebera o numero equivalente ao dia da semana ou do mes!!!

DiadaSemana:= DayOfWeek(Date);

DiadoMes:= DayOfTheMonth(Date);

:lol:


GOSTEI 0
Wolverine

Wolverine

08/06/2004

elphi syntax:

[b:6b15926be7]function DayOfTheWeek(const AValue: TDateTime): Word;[/b:6b15926be7]

C++ syntax:

extern PACKAGE Word __fastcall DayOfTheWeek(const System::TDateTime AValue);

Description

Call DayOfTheWeek to obtain the day of the week represented by a specified TDateTime value. DayOfTheWeek returns a value between 1 and 7, where 1 indicates Monday and 7 indicates Sunday.

Note:DayOfTheWeek is ISO 8601 compliant (where Monday is considered the first day of the week). To obtain the day of the week where Sunday is considered the first day of the week, use the DayOfWeek function instead.
Tip:To make the return value more readable, use the Day of week constants.


[b:6b15926be7]function DayOfWeek(Date: TDateTime): Integer;[/b:6b15926be7]

C++ syntax:

extern PACKAGE Word __fastcall DayOfWeek(const System::TDateTime DateTime);

Description

DayOfWeek returns the day of the week of the specified date as an integer between 1 and 7, where Sunday is the first day of the week and Saturday is the seventh.

Note:DayOfWeek is not compliant with the ISO 8601 standard, which defines Monday as the first day of the week. For an ISO 8601 compliant version, use the DayOfTheWeek function instead.


GOSTEI 0
Paulo_amorim

Paulo_amorim

08/06/2004

Olá

é sempre bom olhar o help do Delphi também, já que este é bastante autoexplicativo

Até+


GOSTEI 0
Zunker

Zunker

08/06/2004

A questão não é olhar o help, pois o meu Delphi não tem help.

Eu só queria saber como usar essa função no meio do programa


GOSTEI 0
Paulo_amorim

Paulo_amorim

08/06/2004

Olá

Relax, foi só uma dica... :wink: muitas vezes os Helps são chatos e confusos, entao muita gente nem perde tempo (em alguns programas, eu sou um que não gosta de usar hehe)
O Help do Delphi, por outro lado, eh muito bom sim...

No site da Borland tem a documentação do Delphi para download se não me engano, ja que o seu não tem!

Até+


GOSTEI 0
POSTAR