Re: [Tutor] UPDATE, pyhthon+postgre

2016-06-01 Thread nitin chandra
Thank you Stephen, Johnf, This is what I did and it worked :- todayTime2 = datetime.datetime.now() todayTime1 = timezone('Asia/Calcutta').localize(todayTime2) time_created=%s WHERE group_code = %s;""", ( .,...,..., str(todayTime1),)) Thanks for the Hint, Johnf :) Nitin On 1 June 2

Re: [Tutor] UPDATE, pyhthon+postgre

2016-06-01 Thread john
cursor1.execute("""UPDATE employee SET name=%s, add=%s, add1=%s, city=%s, state_county=%s, country=%s, basic=%s, WHERE group_code = %s""" % (name,add,add1,city,state_county,country,basic,grpCode)) It appears that you are not required to provide any time or date since you created a default. Of c

[Tutor] UPDATE, pyhthon+postgre

2016-06-01 Thread nitin chandra
Hello All, I am writing a UPDATE statement, but am getting stuck with the following error. Traceback (most recent call last): File "/var/www/passtms/updateCutoff.cgi", line 70, in WHERE group_code = %s;""", (name,add,add1,city,state_county,country,basic,todayDT,todayTIME,grpCode)) DataErro