another method is to use de php date_format() function to get the datetime as a string
the datetime format returned by the PHP Driver is in fact a PHP DATETIME

mydatestring = date_format(myfield,...