question about timestamp and MySQLdb

Ron Garret rNOSPAMon at flownet.com
Wed Oct 19 14:41:44 EDT 2005


In article <bew5f.2828$UF4.1651 at fed1read02>,
 "Sean Berry" <sean at buildingonline.com> wrote:

> I am using MySQLdb to connect to a database and retrieve a timestamp from a 
> table.  The problem is I want the timestamp as a long, unformatted and all.
> 
> In the table I have a timestamp like this
> 20051019111617
> 
> But, when I retrieve the value and print it I get
>  2005-10-19 11:16:17
> 
> I want the numeric version, not the converted date.  Any suggestions? 

Two suggestions:

1.  Read up on strftime.

2.  Rethink what you're doing because it's almost certainly wrong.

rg



More information about the Python-list mailing list