# Scatter plot with date and time on x-axis

**URL:** <https://community.plotly.com/t/scatter-plot-with-date-and-time-on-x-axis/8658>\
**Category:** Dash Python\
**Created:** [February 27, 2018, 5:29pm UTC](https://community.plotly.com/t/scatter-plot-with-date-and-time-on-x-axis/8658 "2018-02-27T17:29:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mattanis](https://avatars.discourse-cdn.com/v4/letter/m/919ad9/32.png) [@Mattanis](https://community.plotly.com/u/Mattanis)\
**Post date:** [February 27, 2018, 5:29pm UTC](https://community.plotly.com/t/scatter-plot-with-date-and-time-on-x-axis/8658/1 "2018-02-27T17:29:15Z")

</div>

I am reading a value and a timestamp(“YYYY-MM-DD hh:mm:ss” is the format of the timestamp) from sqlite databas and trying to get a simple dash scatter plot to display the data. I got the the scatter plot to plot the x-axis with numbers 1,2,3 and so on, and with random numbers on the y-axis. I have tried with timedate(‘now’) on the x-axis but failed.  
Is it possible to get a dash scatter plot to present date and time on the x-axis?

---

<div class="post-metadata">

**Author:** ![chriddyp](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/chriddyp/32/16855_2.png) [@chriddyp](https://community.plotly.com/u/chriddyp)\
**Post date:** [February 27, 2018, 5:44pm UTC](https://community.plotly.com/t/scatter-plot-with-date-and-time-on-x-axis/8658/2 "2018-02-27T17:44:12Z")

</div>

> [@Mattanis](#):
>
> Is it possible to get a dash scatter plot to present date and time on the x-axis?

Either use `datetime` objects (examples here: [Time series and date axes in Python](https://plot.ly/python/time-series/)) or strings in the format `YYYY-MM-DD hh:mm:ss` like `{'x': ['2015-01-10', '2015-01-25']}`
