[EMAIL PROTECTED] wrote:
> hi
> i am using pymmsql to query a date column in MSSQL database table.
> However the result shows for example
> (datetime.datetime(2006, 2, 16, 17, 50, 19) which is supposed to be
> 2006-02-16 17:50:19.000
> anyway to correct query a date column using pymssql so that it gives
> the correct date format? thanks
> 
It doesn't return a format, it returns a value. I presume you are saying 
that you don't like the way the value prints? Use str() on it:

  >>> str(datetime.datetime(2006, 2, 16, 17, 50, 19))
'2006-02-16 17:50:19'

regards
  Steve
-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC                     www.holdenweb.com
PyCon TX 2006                  www.python.org/pycon/

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to