Instead of the third and second last lines you could use:     _dateTime = DateTimeUtil::date(_purchTable.createdDateTime); for the same result.