Why not use CDateTime::getString() ?