# How to change between 12 and 24 hour time display?

**URL:** <https://discourse.nodered.org/t/how-to-change-between-12-and-24-hour-time-display/39359>\
**Category:** General\
**Created:** [18 January 2021 23:35 UTC](https://discourse.nodered.org/t/how-to-change-between-12-and-24-hour-time-display/39359 "2021-01-18T23:35:24Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![sdschramm](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@sdschramm](https://discourse.nodered.org/u/sdschramm)\
**Post date:** [18 January 2021 23:35 UTC](https://discourse.nodered.org/t/how-to-change-between-12-and-24-hour-time-display/39359/1 "2021-01-18T23:35:24Z")

</div>

Hello, is there a way to change these history messages into 12 hour (AM/PM) time format?

![Screen Shot 2021-01-18 at 6.28.45 PM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/6/86ed0b8bc9ebc3e6bbab5c53fd51000a767052ec.png)

I've searched for a solution to this and see a lot of people struggling to input time, but I am just trying to display time in 12 hour format. I live in USA and my browser and computer are all set to 12 hour format, but I can't find any setting for this in Node-RED.

Thanks,

Scott

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [19 January 2021 00:43 UTC](https://discourse.nodered.org/t/how-to-change-between-12-and-24-hour-time-display/39359/2 "2021-01-19T00:43:24Z")

</div>

It would help to know what node you are using, but since that is a status message I would assume that this is something that is controled by te node itself. You might want to ask the node's author on the node's GitHub page.

---

<div class="post-metadata">

**Author:** ![sdschramm](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@sdschramm](https://discourse.nodered.org/u/sdschramm)\
**Post date:** [19 January 2021 01:55 UTC](https://discourse.nodered.org/t/how-to-change-between-12-and-24-hour-time-display/39359/3 "2021-01-19T01:55:42Z")

</div>

The node is just a simple "call service" that comes from the default set.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [19 January 2021 02:43 UTC](https://discourse.nodered.org/t/how-to-change-between-12-and-24-hour-time-display/39359/4 "2021-01-19T02:43:09Z")

</div>

Could you export your flow and attach it to a response?

When you say it is part of the default set, how did you install Node-RED?

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [19 January 2021 03:16 UTC](https://discourse.nodered.org/t/how-to-change-between-12-and-24-hour-time-display/39359/5 "2021-01-19T03:16:37Z")

</div>

That looks to me like a Home Assistant node - not one of the default palette.

Have a look at the help for the node as to who authored it and the options for it.

Craig

---

<div class="post-metadata">

**Author:** ![sdschramm](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@sdschramm](https://discourse.nodered.org/u/sdschramm)\
**Post date:** [19 January 2021 03:35 UTC](https://discourse.nodered.org/t/how-to-change-between-12-and-24-hour-time-display/39359/6 "2021-01-19T03:35:37Z")

</div>

I installed Node-RED from within Home Assistant.  
Here is a 38 second recording of me making a sequence with the issue: [https://youtu.be/zbvwaGd9-LA](https://youtu.be/zbvwaGd9-LA)  
Below is the code of what I created in the clip above.

```auto
[{"id":"bf47a926.e6f82","type":"api-call-service","z":"2014399e.c57456","name":"","server":"4188bc1a.bd4c54","version":1,"debugenabled":false,"service_domain":"switch","service":"toggle","entityId":"switch.office_lamp_2","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":480,"y":360,"wires":[[]]},{"id":"4188bc1a.bd4c54","type":"server","name":"Home Assistant","addon":true}]

```

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [19 January 2021 03:49 UTC](https://discourse.nodered.org/t/how-to-change-between-12-and-24-hour-time-display/39359/7 "2021-01-19T03:49:51Z")

</div>

Yep - so drap one of these nodes onto the palette and then go over to the help/doc on the right hand side and see what the usage is and who the author is.

These are custom nodes that the Home Assistant implementation of NR includes - not standard nodes

Craig

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [19 January 2021 03:52 UTC](https://discourse.nodered.org/t/how-to-change-between-12-and-24-hour-time-display/39359/8 "2021-01-19T03:52:11Z")

</div>

[https://zachowj.github.io/node-red-contrib-home-assistant-websocket/guide/call-service.html#using-mustache-templates](https://zachowj.github.io/node-red-contrib-home-assistant-websocket/guide/call-service.html#using-mustache-templates)

Craig

---

<div class="post-metadata">

**Author:** ![sdschramm](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@sdschramm](https://discourse.nodered.org/u/sdschramm)\
**Post date:** [19 January 2021 04:31 UTC](https://discourse.nodered.org/t/how-to-change-between-12-and-24-hour-time-display/39359/9 "2021-01-19T04:31:19Z")

</div>

Sorry I figured they were default because they came with the installation in HA and I didn't add them.

The link above explains a little more about the call service node but doesn't explain anything about contorting the time format. Is there a different place I should ask this question?

I'm little confused why something so basic isn't controlled by a simple toggle switch or checkbox somewhere.

---

<div class="post-metadata">

**Author:** ![JGKK](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jgkk/32/18515_2.png) [@JGKK](https://discourse.nodered.org/u/JGKK)\
**Post date:** [19 January 2021 05:54 UTC](https://discourse.nodered.org/t/how-to-change-between-12-and-24-hour-time-display/39359/10 "2021-01-19T05:54:37Z")

</div>

You are probably best off opening a feature request on their github page:

> **[GitHub - hassio-addons/addon-node-red: Node-RED - Home Assistant Community...](https://github.com/hassio-addons/addon-node-red)**
>
> Node-RED - Home Assistant Community Add-ons. Contribute to hassio-addons/addon-node-red development by creating an account on GitHub.

> [@sdschramm](#):
>
> m little confused why something so basic isn't controlled by a simple toggle switch or checkbox

Options for formatting the node status is not something that you will find on many nodes if any as that status is really just a nice to have features for quick glance information while developing.  
Design wise the paradigm here is that the flow editor is not a dashboard and its also good practice not to overload a nodes ui with too many options.  
For showing information exactly like you want it the information is probably also included as a timestamp in the nodes output messages as a property and you could format that output yourself to show it in the [nodered dashboard](https://flows.nodered.org/node/node-red-dashboard) in your wanted format.

Johannes

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [20 January 2021 00:12 UTC](https://discourse.nodered.org/t/how-to-change-between-12-and-24-hour-time-display/39359/11 "2021-01-20T00:12:47Z")

</div>

No problem - you are not actually using the default HA nodes i believe you are using the Community Websocket Add on (may be wrong here) - if you look on the link i provided there is a link to their github page and you can open an issue on there

> **[zachowj/node-red-contrib-home-assistant-websocket](https://github.com/zachowj/node-red-contrib-home-assistant-websocket/issues)**
>
> s

Craig

---

<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:** [21 March 2021 00:13 UTC](https://discourse.nodered.org/t/how-to-change-between-12-and-24-hour-time-display/39359/12 "2021-03-21T00:13:04Z")

</div>

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