> FWIW *if* there should be a default date format for DBI, *please* ...
*If* there should be a default date format for DBI it will be the ISO
standard used by ODBC.
For typed placeholders:
$sth->bind_param(1, "2002-01-21", SQL_DATE);
$sth->bind_param(2, "17:45:23", SQL_TIME);
$sth->bind_param(3, "2002-01-21 17:45:23", SQL_DATETIME);
$sth->bind_param(4, "2002-01-21 17:45:23.09", SQL_DATETIME);
For result data the driver could use an attribute to control the
behaviour. Perhaps:
$dbh->{DateTimeISO} = 1;
which, if set, tells the driver that date/time/datetime values
should be returned in ISO format.
The same attribute could apply to non-typed placeholders (where
execute("2002-01-21", ...) is called without any bind_param call
to specify the type).
But, and it's a big BUT, many drivers are not able to discover
the type of placeholders so $sth->execute("2002-01-21", ...)
can't do the right thing for those drivers.
Similarly, there may be some drivers that don't know when a
result column is a date/time type.
(Then there's the issue of handling locale-specific date/time formats
that the database may return. But we can wory about that later.)
Tim [who wishes he had time to catch up ...]