[Overview][Constants][Procedures and functions][Index] |
Calculate the hour of a given DateTime value
Source position: dateutil.inc line 210
function HourOfTheDay( |
const AValue: TDateTime |
):Word; |
AValue |
|
DateTime to calculate the hour of. |
Hour part of AValue.
HourOfTheDay returns the number of hours that have passed since the start of the day till the moment indicated by AValue. This is a zero-based number, i.e. 00:59:59 will return 0.
|
Calculate the number of hours passed since the start of the year. |
|
|
Calculate the number of hours passed since the start of the month. |
|
|
Calculate the number of hours elapsed since the start of the week. |
|
|
Calculate the number of minutes elapsed since the start of the day |
|
|
Calculate the number of seconds elapsed since the start of the day |
|
|
Calculate the number of milliseconds elapsed since the start of the day |
Program Example43; { This program demonstrates the HourOfTheDay function } Uses SysUtils,DateUtils; Var N : TDateTime; Begin N:=Now; Writeln('Hour of the Day : ',HourOfTheDay(N)); Writeln('Minute of the Day : ',MinuteOfTheDay(N)); Writeln('Second of the Day : ',SecondOfTheDay(N)); Writeln('MilliSecond of the Day : ', MilliSecondOfTheDay(N)); End.
lazarus-ccr.sourceforge.net |