Mysql node returns time and date from columns set as DATE

Hi everyone, when I perform a SELECT type qwery through the mysql node in the DATE type columns I receive both time and date, but if I do the same qwery through a Visualdb type client I correctly only receive the date. Is this a bug or am I doing something wrong?
Node red:3.1.8
node-red-node-mysql 2.0
database Mariadb: 1:11.3.2+maria~ubu2204
All used by container

Probably not. JS (currently) has no concept of just a date - there is the Date Object that is the time in milliseconds that has elapsed since the epoch, which is defined as the midnight at the beginning of January 1, 1970, UTC.

But there is no reason you cannot use that in your flows. For example the change node has moment that can convert it to a date string. or you can use a function node to call the various Date.toXxxxx() functions.

The question is really, what are you wishing to do with the date you get from the database? If you wish to show it on a dashboard or pass it somewhere else, then it is probably just a matter of formatting it as you wish.

1 Like

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