homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

Date Formatting MySQL yyyy-mm-dd

5+ Year Member

Msg#: 4115442 posted 8:47 pm on Apr 13, 2010 (gmt 0)

I have asp.textbox populated by asp.Calendar Formated ShortDate. My database is MySQL5 which will only accept yyyy-mm-dd My INSERT INTO (Diarydate)VALUES ( & txtDate.Text & ) I considered using VARCHAR() or CHAR() but I need to keep the date format in the database for filtering/searching
One interesting feature in the asp.Calendar properties SelectedDate which desplays the date formatted yyyy-mm-dd is it possible to say link it to a variable to use to populate MySQL?
Or is there a method convert the textbox date to MySQL format in the INSERT string?



WebmasterWorld Senior Member whoisgregg us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 4115442 posted 7:01 pm on Apr 19, 2010 (gmt 0)

You'll probably find the MySQL Date & Time Functions [dev.mysql.com] to be quite helpful. :)

There's so many different ways to manipulate date/time information it would probably be best for you to take a look at what's available and post back if you run into trouble.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved