Evaluating the current Hour in Delphi
I'm looking for the Delphi eqivalent to the following Ruby Code
if T开发者_开发问答ime.now.hour > 12  then
  # Statement; 
else
  # Alternative Statement;
end
Thanks Stefan
Use
if HourOf(Now) > 12 then
  // Statement
else
  // Alternative Statement;
after you've added DateUtils to your uses clause.
For example,
if Trunc (Time * 24) > 12 then ...
 
         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论