Forum OpenACS Q&A: Re: Handling dates (oracle 10g)

Collapse
Posted by Janine Ohmer on
I ran into this problem recently using the CR Tcl API.

If the Tcl create function you are passing the date to is your own and you control it's inputs, then passing in the date as a string will work if you use to_date() (or to_timestamp if you are inserting into a timestamp column) to specify the format when doing the insert into the database. But if you are using or writing a function that needs to be generic, this is a harder problem to solve.

What I ended up doing with my use of the CR was creating my new object with the date set to an empty string, and then inserting the real value into the database so I could use to_date().