开发者

get hour from TTime object without using DecodeTime method

Is it possible to retrieve hour from TTime object in 开发者_运维百科c++ builder

without using DecodeTime(args), by doing calculations ?


The HourOf function returns the current hour of a TDateTime value.

// get hour from the current time
int Hour;
Hour = HourOf(Now());

Have a look at the DateUtils unit, which include lots of useful functions for handing dates and times.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜