what about using now = datetime.datetime.now() ?

On Wednesday, March 13, 2013 4:28:03 PM UTC+1, Marian wrote:
>
> Ok I did a quick test and this time it worked:
>
> import pyodbc
> import datetime
>
> cnxn = pyodbc.connect('DRIVER={SQL Server Native Client 
> 10.0};SERVER=host;DATABASE=db;UID=user;PWD=pw')
> cursor = cnxn.cursor()
>
> now = datetime.datetime(2013, 3, 13, 15, 2, 9)
>
> cursor.execute("insert into auth_event(time_stamp, client_ip, origin, 
> description) values (?, ?, ?, ?)", now, '192.0.0.1', 'origin', 
> 'description')
> cnxn.commit()
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to