On 2008-07-18 05:28, Dennis Lee Bieber wrote:
On Thu, 17 Jul 2008 20:26:11 -0300, "Gabriel Genellina"
<[EMAIL PROTECTED]> declaimed the following in comp.lang.python:
Note that I used %s everywhere (it's just a placeholder, not a format) and
Unfortunately, in the case of M
In message <[EMAIL PROTECTED]>, Gabriel
Genellina wrote:
> Note that I used %s everywhere (it's just a placeholder, not a format) ...
>From /usr/lib64/python2.5/site-packages/MySQLdb/cursors.py, lines 150-151:
if args is not None:
query = query % db.literal(args)
--
http://mail.pytho
En Wed, 16 Jul 2008 15:00:50 -0300, Keith Hughitt
<[EMAIL PROTECTED]> escribi�:
Thanks Gabriel!
That helps clear things up for me. The above method works very well. I
only have one remaining question:
How can I pass a datetime object to MySQL?'
So far, what I've been doing is building the qu
On 2008-07-17 22:43, Dennis Lee Bieber wrote:
On Thu, 17 Jul 2008 19:55:44 +0200, "M.-A. Lemburg" <[EMAIL PROTECTED]>
declaimed the following in comp.lang.python:
Use binding parameters and it should work:
query = "INSERT INTO image VALUES(%d, %d, %s, '%s')"
If this is MySQLdb inter
On 2008-07-16 20:00, Keith Hughitt wrote:
Thanks Gabriel!
That helps clear things up for me. The above method works very well. I
only have one remaining question:
How can I pass a datetime object to MySQL?'
So far, what I've been doing is building the query as a string, for
example:
query = "I
In message
<[EMAIL PROTECTED]>, Keith
Hughitt wrote:
> I have a UTC date (e.g. 2008-07-11 00:00:00). I would like to create a
> UTC date ...
>>> import calendar
>>> calendar.timegm((2008, 7, 11, 0, 0, 0, 0, 0, -1))
1215734400
[EMAIL PROTECTED]> TZ=NZ date -d "00:00:00 01-Jan-1970Z +1215734400 s
Thanks Gabriel!
That helps clear things up for me. The above method works very well. I
only have one remaining question:
How can I pass a datetime object to MySQL?'
So far, what I've been doing is building the query as a string, for
example:
query = "INSERT INTO image VALUES(%d, %d, %s, '%s')" %
En Mon, 14 Jul 2008 12:06:30 -0300, Keith Hughitt
<[EMAIL PROTECTED]> escribió:
On Jul 12, 12:52 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
En Fri, 11 Jul 2008 15:42:37 -0300, Keith Hughitt
<[EMAIL PROTECTED]> escribió:
> I am having a little trouble figuring out how to convert a pyt
On Jul 12, 12:52 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Fri, 11 Jul 2008 15:42:37 -0300, Keith Hughitt
> <[EMAIL PROTECTED]> escribi�:
>
> > I am having a little trouble figuring out how to convert a python
> > datetime to UTC. I have a UTC date (e.g. 2008-07-11 00:00:00). I woul
Gabriel Genellina <[EMAIL PROTECTED]>:
> En Fri, 11 Jul 2008 15:42:37 -0300, Keith Hughitt
> <[EMAIL PROTECTED]> escribi�:
>
>> I am having a little trouble figuring out how to convert a python
>> datetime to UTC. I have a UTC date (e.g. 2008-07-11 00:00:00). I would
>> like to create a UTC date
En Fri, 11 Jul 2008 15:42:37 -0300, Keith Hughitt
<[EMAIL PROTECTED]> escribi�:
I am having a little trouble figuring out how to convert a python
datetime to UTC. I have a UTC date (e.g. 2008-07-11 00:00:00). I would
like to create a UTC date so that when I send it to MySQL (which
treats all d
Hi,
I am having a little trouble figuring out how to convert a python
datetime to UTC. I have a UTC date (e.g. 2008-07-11 00:00:00). I would
like to create a UTC date so that when I send it to MySQL (which
treats all dates at local dates by default), it will already have
incorporated the proper UT
12 matches
Mail list logo