Preserve milli-precision in non-prepared datetimes

When a datetime was used for a 'timestamp' value in a non-prepared
statement, all sub-second precision was lost.  After this change,
millisecond level precision will be kept.