View Single Post
Old Feb 12th, 2007, 3:06 PM   #1
poopman
Newbie
 
Join Date: Feb 2007
Posts: 13
Rep Power: 0 poopman is on a distinguished road
Formatting date from MySQLdb

Hey all,

I've wrtting something that gathers the date from a mySQL database but I need to be able to grab the year, or month, or day, or everything if needed. When I get the date from my database I get this:

(datetime.date(2007, 2, 9),)

How would I format it so I can have the dates end up like this?:

2009-02-09

Any help is much appreciated! :banana:
poopman is offline   Reply With Quote