Re: Insert NULL into mySQL datetime

2013-12-26 Thread Jussi Piitulainen
Dennis Lee Bieber writes: > On Wed, 25 Dec 2013 17:20:35 -0800 (PST), ru...@yahoo.com declaimed > the following: > > > if a is None: > >cur.execute("Insert Into mytable(datefield) VALUES(NULL))", (,)) > > I'm pretty sure that MySQLdb, at least, does not require the >

Re: Insert NULL into mySQL datetime

2013-12-26 Thread rurpy
On 12/24/2013 05:33 PM, Igor Korot wrote: > Hi, ALL, > I am working on a script that parses CSV file and after successful > parsing insert data ino mySQL table. > One of the fields in CSV holds a date+time value. > > What the script should do is check if the cell has any data, i.e. not > empty an

Re: Insert NULL into mySQL datetime

2013-12-25 Thread Peter Otten
Igor Korot wrote: > Hi, ALL, > I am working on a script that parses CSV file and after successful > parsing insert data ino mySQL table. > One of the fields in CSV holds a date+time value. > > What the script should do is check if the cell has any data, i.e. not > empty and then make sure that t

Insert NULL into mySQL datetime

2013-12-24 Thread Igor Korot
Hi, ALL, I am working on a script that parses CSV file and after successful parsing insert data ino mySQL table. One of the fields in CSV holds a date+time value. What the script should do is check if the cell has any data, i.e. not empty and then make sure that the data is date+time. If the vali