Ran into a problem and something that seemed simple at first.
I want to do this (query has been dumbed down for brevity here, it's actually much longer and more complex):
query = ("""INSERT INTO %s " % cfg['mysql.table']
"('hostname', 'timestamp', 'metric', 'average', 'peakhigh', 'peaklow', 'gsamp', 'zsamp', 'nsamp')"""
"VALUES ( %s, %s, %s, %s, %s, %s, %s, %s, %s )"
)
So how do I incorpoarate STR_TO_DATE into this query for the timestamp field?
Thanks for any help.