I am creating a python app (DASH app) check what is dash here (https://youtu.be/5BAthiN0htc) and I would like insert Today's DATE and TIME. Could you please help me on adding it to my app?
Thanks,
I am creating a python app (DASH app) check what is dash here (https://youtu.be/5BAthiN0htc) and I would like insert Today's DATE and TIME. Could you please help me on adding it to my app?
Thanks,
Below I provide a solution for those who may have similar problem:
The code should be similar to below code and put it inside the DIV of your Dash App ( app.layout = html.Div([ ). I put atributes to allow you customize the format of display.
import datetime
html.Div([
html.H1(
datetime.datetime.now().strftime('%Y-%m-%d'), style=
{'opacity': '1','color': 'white', 'fontSize': 12}),
html.H1(datetime.datetime.now().strftime('%H:%M:%S'), style=
{'opacity': '1','color': 'white', 'fontSize': 12}),
],
],
html.Br([]),
2018-02-24
19:33:39