Modified the date type's "to_sql" property to return to_timestamp if the format includes minutes and seconds, to_date otherwise. In reality we should probably move to having both date and timestamp template types but for now this should work for both Oracle and PG.