Python - convert mysql timestamps type to matplotlib and graph
you can use datetime module,although i use now() function to extract datetime from mysql,but i consider the format is the same。
for instance
python>import datetime as dt
i put the datetime data into a list named datelist,and now you can use  datetime.strptime function to convert the date format to what you want
python>dates = [dt.datetime.strptime(d,'%Y-%m-%d %H:%M:%S') for d in datelist
At last,you can put the list named dates into plot X-axis
I hope it helps you.
After doing a bit of research I am finding it difficult to find out how to use mysql timestamps in matplotlib.
Mysql fields to plot
X-axis:
Field: entered
Type: timestamp
Null: NO
Default: CURRENT TIMESTAMP
Sample: 2017-05-08 18:25:10
Y-axis:
Field: value
Type: float(12,6)
Null: NO
Sample: 123.332
What date format is matplotlib looking for? How do I convert to this format? I found out how to convert from unix timestamp to a format that is acceptable with matplotlib, is unix timestamp better than the timestamp field type I am using? Should I convert my whole table to unix timestamps instead?
Would appreciate any help!