Thanks,
Jeff
I find that strange, because Postgres doesn't natively support a
column-type "datetime". Nevertheless, you can use a timestamp column
for millisecond resolution
http://www.postgresql.org/docs/8.2/interactive/datatype-datetime.html
hope this helps,
Jonas
He means Django's DateTimeField.
Django creates a column of type 'timestamp with time zone' for
DateTimeField. The postgres docs claim microsecond resolution for
both with and without timezone.
Can you share some code demonstrating the trouble?
-------------- Original message --------------
From: "Jeremy Dunck" <jdu...@gmail.com>
>
> On 3/27/07, Jonas Maurus wrote:
> >
> > On Mar 27, 7:58 pm, "jeffhg58" wrote:
> ..
> > > in the database. I am using a datetime field and when I insert the
> > > record the milliseconds is being truncated.
> >
> > I find that strange, because Postgres doesn't natively support a
> > column-type "datetime". Nevertheless, you can use a timestamp column
> > for millisecond resolution
>
> He means Django's DateTimeField.
>
> Django creates a column of type 'timestamp with time zone' for
> DateTimeField. The postgres docs claim microsecond resolution for
> both with and without timezone.
>
> C an you share some code demonstrating the trouble?
>
>
Err, yeah, that's the bit I was asking for.
So, this doesn't work?
import datetime
from yourproject.yourapp import models
d = datetime.datetime(2006, 11, 22, 13, 43, 24, 43)
ex = models.Example(ExecutionStartDate=d)
ex.save()
?
It just worked for me, using pg 8.1 and django trunk.