Try this example
[{"id":"27715663.ec571a","type":"inject","z":"53c7fdaa.e46f0c","name":"value input","topic":"","payload":"98","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":108,"y":288,"wires":[["9fddc311.389708"]]},{"id":"9fddc311.389708","type":"function","z":"53c7fdaa.e46f0c","name":"","func":"let value = msg.payload\nlet d = new Date().toISOString().split(\"T\")\nlet date = d[0];\nlet time = d[1].split(\".\")[0]\nlet filename = \"./data_\"+date+\".csv\"\n\nlet csv = date+\",\"+time+\",\"+value+\"\\r\"\n\nreturn {filename:filename,payload:csv}","outputs":1,"noerr":0,"x":266,"y":288,"wires":[["115a5f9e.20a688"]]},{"id":"115a5f9e.20a688","type":"file","z":"53c7fdaa.e46f0c","name":"","filename":"","appendNewline":true,"createDir":false,"overwriteFile":"false","encoding":"none","x":482,"y":240,"wires":[["cba862c2.e9afa"]]},{"id":"9a89661b.1e6e3","type":"inject","z":"53c7fdaa.e46f0c","name":"Create new file at 00:00","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"00 00 * * *","once":false,"onceDelay":0.1,"x":158,"y":192,"wires":[["de60ef75.0fe2d8"]]},{"id":"de60ef75.0fe2d8","type":"function","z":"53c7fdaa.e46f0c","name":"","func":"\nlet d = new Date().toISOString().split(\"T\")\nlet date = d[0];\nlet filename = \"./data_\"+date+\".csv\"\nlet headers = \"Date,Time,Value\"\n\nreturn {filename:filename,payload:headers}","outputs":1,"noerr":0,"x":338,"y":192,"wires":[["115a5f9e.20a688"]]},{"id":"cba862c2.e9afa","type":"debug","z":"53c7fdaa.e46f0c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":626,"y":240,"wires":[]}]
This does not use the csv node (as csv is comma separated text).
At 00:00 it creates a new file data_<date>.csv
and the values are written that file.
File contents looks like:
Date,Time,Value
2020-04-28,06:47:23,98
2020-04-28,06:47:24,98
2020-04-28,06:47:24,98