Convert date to utcDateTime

You can convert with the method DateTimeUtil::anyToDateTim([anyType]) BUT, I have receive some erros by use this method.

You can also use the conversion by a string !

date curDate;
utcDateTime newDateTime;

curDate             = systemDateGet(); 
newDateTime         = DateTimeUtil::parse(strfmt("%1T00:00:00", date2str(curdate, 321, 2, 3, 2, 3, 4)));
//=> 01-02-2010T00:00:00

For the time, you can use also the method : timeNow()

Advertisements