# Get time matching ui\_date\_picker

**URL:** <https://discourse.nodered.org/t/get-time-matching-ui-date-picker/42601>\
**Category:** General\
**Created:** [14 March 2021 00:48 UTC](https://discourse.nodered.org/t/get-time-matching-ui-date-picker/42601 "2021-03-14T00:48:07Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![meeki007](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/meeki007/32/12499_2.png) [@meeki007](https://discourse.nodered.org/u/meeki007)\
**Post date:** [14 March 2021 02:51 UTC](https://discourse.nodered.org/t/get-time-matching-ui-date-picker/42601/3 "2021-03-14T02:51:49Z")

</div>

I use [node-red-contrib-moment](https://flows.nodered.org/node/node-red-contrib-moment)

here is an example....

 ![Screenshot from 2021-03-13 21-50-27](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/0/805183d97b800ed6a3afbe26793bee1d17e15927.png)

```auto
[{"id":"38408627.2b4cda","type":"moment","z":"150b582b.3e6d68","name":"year","topic":"","input":"epoch","inputType":"msg","inTz":"America/New_York","adjAmount":0,"adjType":"days","adjDir":"add","format":"YYYY","locale":"C","output":"year","outputType":"msg","outTz":"America/New_York","x":330,"y":860,"wires":[["16c64f42.d8cb39"]]},{"id":"16c64f42.d8cb39","type":"moment","z":"150b582b.3e6d68","name":"month","topic":"","input":"epoch","inputType":"msg","inTz":"America/New_York","adjAmount":0,"adjType":"days","adjDir":"add","format":"MM","locale":"C","output":"month","outputType":"msg","outTz":"America/New_York","x":450,"y":860,"wires":[["239baeb.17c58d2"]]},{"id":"239baeb.17c58d2","type":"moment","z":"150b582b.3e6d68","name":"day","topic":"","input":"epoch","inputType":"msg","inTz":"America/New_York","adjAmount":0,"adjType":"days","adjDir":"add","format":"DD","locale":"C","output":"day","outputType":"msg","outTz":"America/New_York","x":570,"y":860,"wires":[["4cc6e2d8.4df52c"]]},{"id":"4cc6e2d8.4df52c","type":"moment","z":"150b582b.3e6d68","name":"hour","topic":"","input":"epoch","inputType":"msg","inTz":"America/New_York","adjAmount":0,"adjType":"days","adjDir":"add","format":"HH","locale":"C","output":"hour","outputType":"msg","outTz":"America/New_York","x":690,"y":860,"wires":[["c059c10b.4cf98"]]},{"id":"c059c10b.4cf98","type":"moment","z":"150b582b.3e6d68","name":"minutes","topic":"","input":"epoch","inputType":"msg","inTz":"America/New_York","adjAmount":0,"adjType":"days","adjDir":"add","format":"mm","locale":"C","output":"minutes","outputType":"msg","outTz":"America/New_York","x":820,"y":860,"wires":[["97523b5.7c753c8"]]},{"id":"97523b5.7c753c8","type":"moment","z":"150b582b.3e6d68","name":"seconds","topic":"","input":"epoch","inputType":"msg","inTz":"America/New_York","adjAmount":0,"adjType":"days","adjDir":"add","format":"ss","locale":"C","output":"seconds","outputType":"msg","outTz":"America/New_York","x":960,"y":860,"wires":[["67b8044e.6bb984"]]},{"id":"766a6b3a.2e952c","type":"inject","z":"150b582b.3e6d68","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":200,"y":860,"wires":[["38408627.2b4cda"]]},{"id":"67b8044e.6bb984","type":"debug","z":"150b582b.3e6d68","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1090,"y":860,"wires":[]}]

```

see this for formatting it to your needs  
[https://momentjs.com/docs/#/displaying/format/](https://momentjs.com/docs/#/displaying/format/)

---

_[View the full topic](https://discourse.nodered.org/t/get-time-matching-ui-date-picker/42601)._
