Dashboards and date conversions

Im trying to use $__from, and $__to in JS code to return a unix timestamp and then convert that to a current date and display in a panel on the dashboard. not sure how to write the code. Often times the date selector cannot be seen on a tv so I want to return the date in the box.

Can you just use necessary formatting of ${__from} and ${__to} ?

| Format | From | To |
| -------- | ------- | ------- |
| UNIX Timestamp | ${__from} | ${__to} |
| Formatted | ${__from:date:YYYY-MM-DD HH:mm:ss} | ${__to:date:YYYY-MM-DD HH:mm:ss} |


1 Like