Fórum Funções com data #236738
08/06/2004
0
Como funcionam as funções DayOfTheMonthe e DayOfTheWeek
Zunker
Curtir tópico
+ 0Posts
08/06/2004
Xanatos
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
08/06/2004
Wolverine
[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
08/06/2004
Paulo_amorim
é sempre bom olhar o help do Delphi também, já que este é bastante autoexplicativo
Até+
Gostei + 0
09/06/2004
Zunker
Eu só queria saber como usar essa função no meio do programa
Gostei + 0
09/06/2004
Paulo_amorim
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
Clique aqui para fazer login e interagir na Comunidade :)