REPOST: dtuple and sql functions

tweek tweek154 at
Wed Dec 26 20:30:33 CET 2001

i am dealing with converting the date format from a MySQL database and
i'd prefer to use the built in sql function than convert it using
python.  here is what im trying to accomplish:

flist = ["AssignedTo", "DATE_FORMAT(DueDate, '%m/%e/%Y')"]
descr = dtuple.TupleDescriptor([[n] for n in flist])

sql = """SELECT %s FROM joblog""" % ", ".join(flist)
temp = c.fetchall()

now unfortunately the field name is now called:
temp.DATE_FORMAT(DueDate, '%m/%e/%Y')

which should be invalid anyways.  what i want is to use it as


========= WAS CANCELLED BY =======:
From: tweek154 at (tweek)
Newsgroups: comp.lang.python
Subject: cmsg cancel <ac5c87bb.0112261130.5422f67e at>
Control: cancel <ac5c87bb.0112261130.5422f67e at>
Date: Mon, 31 Dec 2001 03:56:06 GMT
Organization: A poorly-installed InterNetNews site
Lines: 2
Message-ID: <cancel.ac5c87bb.0112261130.5422f67e at>
X-Trace: 1009776125 27193 (31 Dec 2001 05:22:05 GMT)
X-Complaints-To: usenet at
NNTP-Posting-Date: Mon, 31 Dec 2001 05:22:05 +0000 (UTC)
X-No-Archive: yes
X-Unac4ncel: yes
X-Commentary: I love NewsAgent 1.10 and the Sandblaster Cancel Engine Build 74 (19 March 1999)

This message was cancelled from within Mozilla.

More information about the Python-list mailing list