in reply to Oracle Dates DBD

Dates are a pain, since every DBMS seems to handle them slightly differently. But for oracle, I generally like to use TO_DATE to insert dates into an Oracle table in the format you mentioned (ISO format) along with TO_CHAR.

To insert a date, I would wrap it in TO_DATE, ie:

INSERT into MYTABLE (MYBIRTHDAY) VALUES (TO_DATE('1977-07-09 00:00:00', 'YYYY-MM-DD HH24:MI:SS'))

But then conversely, I like to just use TO_CHAR when querying a date, since it comes back in alpha-numberic order that way and I can simply do something like this:

select * from MYTABLE WHERE TO_CHAR(MYBIRTHDAY,'YYYY-MM-DD') = '1977-07-09'

Also, note that you can use the TO_CHAR function to wrap the date field in the section of the SQL which specifies the fields to select. ( where I have '*', you could have TO_CHAR(MYBIRTHDAY, 'YYYY-MM-DD'), OTHERFIELD1, OTHERFIELD2 )