Hi,
I have the following code in python to inset data in a MySql table:
sql = "INSERT INTO ap_temp_data (sensor, date, time, temp) VALUES (%s, %s, %s, %s)"
#temp_avalue=read_temp()
val = (sensor, time.strftime("%d.%m.%Y"), time.strftime("%H:%M:%S"), read_temp())
mycursor.execute(sql, val)
mydb.commit()
The problem is that the date for 22.01.2019 in MySql is like that: 2022-01-20
Any idea what is wrong ?
I have the following code in python to inset data in a MySql table:
sql = "INSERT INTO ap_temp_data (sensor, date, time, temp) VALUES (%s, %s, %s, %s)"
#temp_avalue=read_temp()
val = (sensor, time.strftime("%d.%m.%Y"), time.strftime("%H:%M:%S"), read_temp())
mycursor.execute(sql, val)
mydb.commit()
The problem is that the date for 22.01.2019 in MySql is like that: 2022-01-20
Any idea what is wrong ?