开发者

get hour from TTime object without using DecodeTime method

开发者 https://www.devze.com 2023-03-31 12:36 出处:网络
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 valu

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

精彩评论

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

关注公众号