Export SQL data to CSV file

Hi to everyone,

I need to export data from SQL to a CSV file; the problem I'm having is that for the "Timestamp" field containing date and time, only the date is export but not the time.

Where am I going wrong? Thanks a lot






Please add a debug on the output of the CSV node and show the output. Thanks.

Hi,

Thanks for your help.

The DEBUG node after CSV node returns as many messages as the records in the SQL DB table

The output data is missing the values ​​of hours, minutes and seconds

Sorry, not concentrating! What is that red function node doing? You shouldn't need anything between the SQL output and the csv node.

Sorry I didn't understand

The json2csv is a node without parameters

node-red-contrib-json2csv (node) - Node-RED.

I don't have to use the "json2csv" node; I used it because it seemed fast to achieve my goals.

Do you have another method to suggest me to export data to CSV?

Don't know why that node exists since the core CSV node does exactly that - converts a JS object to a CSV output. :slight_smile:

The MSSQL node returns a JS array of objects. All you need to do is pass it through a CSV node