# Changing the date and time format

**URL:** <https://discourse.nodered.org/t/changing-the-date-and-time-format/89736>\
**Category:** Dashboard\
**Tags:** dashboard-2\
**Created:** [24 July 2024 19:02 UTC](https://discourse.nodered.org/t/changing-the-date-and-time-format/89736 "2024-07-24T19:02:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![xfear1](https://avatars.discourse-cdn.com/v4/letter/x/4da419/32.png) [@xfear1](https://discourse.nodered.org/u/xfear1)\
**Post date:** [24 July 2024 19:02 UTC](https://discourse.nodered.org/t/changing-the-date-and-time-format/89736/1 "2024-07-24T19:02:58Z")

</div>

Hello!  
I am having trouble changing the date format for my chart, I am stuck with the following way:

 ![prblempng](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/e/5ed50be7621dd8a62a2804161a1b365a8629cb01.png)

Can I change to 24/07 15:40 instead of the way is currently displaying?  
Another problem, how can I input the current Day/Month/Year below the chart?  
Following the example bellow:

 ![exemplo](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/d/5d97dee2ba38d44e2b92ead5e98f231ce005b5c6.png)

I edited on paint the way I want it.

Another problem I am having, can I input the current hour and next hour from current hour below my gauge?  
Like the following example:

 ![EXEMPLEO 2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/2/9211bd3b984f760e7ac8d223c02ab7197c020544.jpeg)

---

<div class="post-metadata">

**Author:** ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)\
**Post date:** [26 July 2024 15:43 UTC](https://discourse.nodered.org/t/changing-the-date-and-time-format/89736/2 "2024-07-26T15:43:30Z")

</div>

> [@xfear1](#):
>
> Can I change to 24/07 15:40 instead of the way is currently displaying?

The "Format" option allows you to select from a few of our pre-defined options, or define your own using [Luxon](https://moment.github.io/luxon/#/formatting?id=table-of-tokens) tokens.

> [@xfear1](#):
>
> Another problem, how can I input the current Day/Month/Year below the chart?

A couple of options here:

1. "UI Text" node, set the alignment to central, and then inject a message (which by default will the current timestamp), wire it to a function node, and use JavaScript's [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) object to compute the relevant string.
2. Create your own `ui-template` node and use the in-built Data object to render it straight into the `<template />` code.

---

<div class="post-metadata">

**Author:** ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)\
**Post date:** [26 July 2024 15:49 UTC](https://discourse.nodered.org/t/changing-the-date-and-time-format/89736/3 "2024-07-26T15:49:52Z")

</div>

> [@xfear1](#):
>
> Another problem I am having, can I input the current hour and next hour from current hour below my gauge?

It's not currently possible to update these at runtime, i.e. via `msg` injection - however it will be coming soon: [Modify/Update UI-widget parameters from external · Issue #833 · FlowFuse/node-red-dashboard · GitHub](https://github.com/FlowFuse/node-red-dashboard/issues/833)

We're working through all node types to ensure this is supported across the board.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [25 August 2024 15:50 UTC](https://discourse.nodered.org/t/changing-the-date-and-time-format/89736/4 "2024-08-25T15:50:37Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
