homepage Welcome to WebmasterWorld Guest from 54.234.147.84
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderators: physics

Databases Forum

    
Date Formatting MySQL yyyy-mm-dd
latoc




msg:4115366
 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?

 

whoisgregg




msg:4118294
 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