We had a similar problem with getting asp to insert into an oracle date
field -- ended up using the to_date function in oracle (or setting sysdate
as the default)
At http://www.mysql.com/doc/en/Date_and_time_functions.html, looks like the
one you need is the date_format command, in addition to curdate, hence
something like:
insert into temp (testdate) values (date_format(curdate(),"%Y-%m-%d")
(or very close, I couldn't get it to work consistently)
Or you could also set it as type "TIMESTAMP" which auto-sets the date /
time when something is inserted.
Michael
--
Michael Viron
Core Systems Group
Simple End User Linux
At 09:51 AM 7/3/2003 -0700, Ed Kraft wrote:
>Hey All,
>
>How do I insert a date field into my mySQL db? I had it working with
>Access (using the date()) function. Now after looking here:
>
>http://www.mysql.com/doc/en/Date_and_time_functions.html
>
>I see that it has to be done differently. I've tried using the CURDATE
>function, but that doesn't do anything within my ASP pages.
>
>Thanks,
>
>Ed
>
>
>--
>MySQL ODBC Mailing List
>For list archives: http://lists.mysql.com/myodbc
>To unsubscribe: http://lists.mysql.com/myodbc?unsub=1
>