I dont can convert date time format with datetime.datetime.strptime

Hi, i dont can convert the date from this format: Mon Feb 26 08:00:00 CST 2018, to this one: 20180226 08:00:00.000

i’m traying with the datetime.datetime.strptime function but is not working.

Error: java.lang.Exception: java.lang.Exception: Error executing system.db.runPrepUpdate(UPDATE laboratorio_PeletSQC_Test SET ValorMuestra = ? WHERE ts_muestra = ?, [7.0, Mon Feb 26 08:00:00 CST 2018], cnxLaboratorio, , false, false)

Thanks Gerardo.

You need to change your designer to read/write mode. Its in the Project menu.

Hi, zxcslo. Sorry i change the mode and this is the error message

Thanks Gerardo

Do you need the string conversion? The database driver will handle everything if you take datetime value from your first query, and use it directly in your update like:

for row in strRsConsulta:
  myTs = row[0]


argsSQL = [valor, myTs]
system.db.runPrepupdate(querySQL, argsSQL, cnxDB)

Hi phillip.bow and zxcslo, both were right about the solution, evrything is ok, the code is working rigth now

the final code is:

thanks Gerardo


About this case i found this webs pages, i dont use this information but here is:


Regards Gerardo