# AXIS in seconds hh:mm:ss

**URL:** <https://community.plotly.com/t/axis-in-seconds-hhss/79094>\
**Category:** Dash Python\
**Created:** [October 6, 2023, 5:16pm UTC](https://community.plotly.com/t/axis-in-seconds-hhss/79094 "2023-10-06T17:16:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gabino.alonso](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/gabino.alonso/32/26732_2.png) [@gabino.alonso](https://community.plotly.com/u/gabino.alonso)\
**Post date:** [October 6, 2023, 5:16pm UTC](https://community.plotly.com/t/axis-in-seconds-hhss/79094/1 "2023-10-06T17:16:39Z")

</div>

Hi all, I have a series of data of the type (column 't\_produccion,) in number os seconds:

![img002](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/3/d/3db2a9308fd8463e39b1b3478542b1602dd96284.png)

 ![img001](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/8/d/8d36e556ac2766f1434d9b3c1bdb902afe5dd580.png)

What is the best way to display the data in a graph with the format hh:mm:ss

I also have the possibility of changing the format to type time:

![img003](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/7/a/7a7429e2554ad78c5f3184281c6eee7ecc6ddd88.png)

is better ?

Thanks a lot !!!

---

<div class="post-metadata">

**Author:** ![AIMPED](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/aimped/32/21758_2.png) [@AIMPED](https://community.plotly.com/u/AIMPED)\
**Post date:** [October 6, 2023, 5:22pm UTC](https://community.plotly.com/t/axis-in-seconds-hhss/79094/2 "2023-10-06T17:22:44Z")

</div>

Hey @gabino.alonso, welcome to the forums.

I don’t see any variable of type datetime. If there was any, you could just format the axes correspondingly.

> **[Time](https://plotly.com/python/time-series/)**
>
> Over 21 examples of Time Series and Date Axes including changing color, size, log axes, and more in Python.

---

<div class="post-metadata">

**Author:** ![gabino.alonso](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/gabino.alonso/32/26732_2.png) [@gabino.alonso](https://community.plotly.com/u/gabino.alonso)\
**Post date:** [October 6, 2023, 5:30pm UTC](https://community.plotly.com/t/axis-in-seconds-hhss/79094/3 "2023-10-06T17:30:20Z")

</div>

Sorry, I forgot to put the information correctly:

I want to graph with my variable ‘t\_production’ which is the time in seconds (int type) on the x axis

The other possibility is to convert that variable directly in the DB to timedelta (I think).

---

<div class="post-metadata">

**Author:** ![gabino.alonso](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/gabino.alonso/32/26732_2.png) [@gabino.alonso](https://community.plotly.com/u/gabino.alonso)\
**Post date:** [October 10, 2023, 1:52pm UTC](https://community.plotly.com/t/axis-in-seconds-hhss/79094/4 "2023-10-10T13:52:44Z")

</div>

Finally I have solved my problem by recording the production time in “timestamp” format instead of in “number of seconds”

![img004](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/6/7/6753fdc3ebe886cad11c1f836e72048dd29e56e2.png)

and in this way the plotly can graph that data directly.

 ![img005](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/3/b/3bff4f1b45a667519991b988521079eeaa3ca3ea.png)

Thanks for everything.
