Psycopg2 SyntaxError: invalid syntax on "INSERT INTO" database

Mitya Sirenef msirenef at lightbird.net
Wed Jan 9 21:56:19 EST 2013


On Wed 09 Jan 2013 09:20:10 PM EST, andydtaylor at gmail.com wrote:
> Thanks for your help guys.
>
> I was actually doing a few things wrong, but I have got this script to work by declaring fields as varchar and all values as strings. But I would like to log journey time values in hours/minutes, so I will have to look into the following:
>
> 1. Retrieving this data from postgres as text, converting it and using it. I will need to add/subtract on this time value; or
> 2. Recognising it as a time class in the first instance by using the string parsing function.
>
> Regards,
>
> Andy


Why not store as an int, in minutes, and then parse into h:m
when displaying?

 - m



--
Lark's Tongue Guide to Python: http://lightbird.net/larks/



More information about the Python-list mailing list