On 8/23/2014 19:38, Shuai Meng wrote:
+ GetLocalTime(<);It's better to init 'wDayOfYear' part too, even if it's not used internally +variant will show its garbage value.
+ ud.st = lt;
+ VarDateFromUdateEx(&ud, 0, VAR_DATEVALUEONLY, &date);
+ return return_date(res, date);
Also I'm not sure about ignoring return value of VarDateFromUdateEx().