"J" <nobody at (no spam) nowhere.com> wrote in
news:cdmdnTKi4bY_uHTXnZ2dnUVZ_gidnZ2d at (no spam) posted.nuvoxcommunications:
My gridview is bound to a Mysql table using a sqldatasource. It works
fine except I want to be able to edit a date field. I want to display
and edit in mm/dd/yyyy format. The problem is that Mysql expect the
date data to be in yyyy-mm-dd format. The following displays and
edits as I'd like but I get an error when updating (unless I type it
in yyyy-mm-dd format). Thanks!
Drop the drag and drop garbage and build your own bits to grab the data
and transform the date to the string format MySQL expects. The ToString
() method has different date formats. If none work for you, then you can
use a culture that has the format as their default and use a standard
ToDateString().
Note, also, that you might be able to send the date back to MySQL as a
date if you can the drag and drop bits. i have not touched MySQL in
ages, so I cannot advise on MySQL.
Peace and Grace,
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
Twitter: at (no spam) gbworld
Blog:
http://gregorybeamer.spaces.live.com
*******************************************
| Think outside the box! |
*******************************************