Link to home
Start Free TrialLog in
Avatar of cypherbad
cypherbad

asked on

Get Hour

Hi Expers,
First of all i`m a leecher so i only got 100 points left so bare with me xD.
Second i need a code that will show me the current hour, not the time (Timetostr(time)) but only the hour.
Thanks,
Cypher
Avatar of SteveBay
SteveBay
Flag of United States of America image

Something like this:

var HH,MM,SS,MS : Word
begin
     DecodeTime(Now,HH,MM,SS,MS);
     ShowMessageFmt('It is Hour %d',[HH]);
end;
ASKER CERTIFIED SOLUTION
Avatar of SteveBay
SteveBay
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cypherbad
cypherbad

ASKER

you could alos use the
HourOf(Now)  
from  DateUtils

and how to make it in a showmessage
i found out, thanks.
Thanks it worked using inttostr