I'm puzzled about the correct use of bind variables with dates in Oracle. This isn't within the database or when using PL/SQL, but rather when interacting with Oracle across an OCI interface, where the date needs to be passed in as a string using the to_date function.
I would have thought the right approach to ensure the proper use of bind variables is to do the following:
to_date(:my_date, :my_date_format)
However, I've seen approaches where the date format isn't done using binds, so I'm a little confused.
Can anyone confirm this or suggest the best approach?