Bokeh HoverTool not showing timestamp in correct format

Whenever I plot any graph having the time in the “hh:mm:ss” format and use hover tool for seeing the timestamp in the same format at any point in the plot, I see a decimal number having an exponential degree.

For example, the time is “23:04:12”, I would see some random number having value “5.8373e7”.

Kindly run the “Test.ipynb” code with the example “Dummy.csv”, both given in the following google drive link, for better clarity on my question.

https://drive.google.com/drive/folders/1_FAp4ASuwBJxl6Mtp0xQwxSQ1Zcl9vvx

I would be highly obliged if anyone could give me a solution to this issue so that I can see the timestamp in the “hh:mm:ss” format on the hover tool.

Thanks in advance!

@mayainevitable You need to specify a format for the specific field in HoverTool as a date/time format. For example

hover_tool.formatters = { "@{close date}": "datetime"}

It is described in detail in documentation.

1 Like