From 873029438f0cc5d78ae8b65ab5dad65a00d9e9ef Mon Sep 17 00:00:00 2001 From: Omar Ajoue Date: Wed, 21 Jul 2021 14:30:38 +0200 Subject: [PATCH] Fixed the spreadysheet nodes for saving dates --- packages/nodes-base/nodes/SpreadsheetFile.node.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/nodes-base/nodes/SpreadsheetFile.node.ts b/packages/nodes-base/nodes/SpreadsheetFile.node.ts index b87dbde1ab..fcf972de63 100644 --- a/packages/nodes-base/nodes/SpreadsheetFile.node.ts +++ b/packages/nodes-base/nodes/SpreadsheetFile.node.ts @@ -31,6 +31,10 @@ function flattenObject(data: IDataObject) { const returnData: IDataObject = {}; for (const key1 of Object.keys(data)) { if (data[key1] !== null && (typeof data[key1]) === 'object') { + if (data[key1] instanceof Date) { + returnData[key1] = data[key1]?.toString(); + continue; + } const flatObject = flattenObject(data[key1] as IDataObject); for (const key2 in flatObject) { if (flatObject[key2] === undefined) {