diff --git a/packages/nodes-base/nodes/DateTime/DateTime.node.ts b/packages/nodes-base/nodes/DateTime/DateTime.node.ts index dd5111b485..7dcbb06655 100644 --- a/packages/nodes-base/nodes/DateTime/DateTime.node.ts +++ b/packages/nodes-base/nodes/DateTime/DateTime.node.ts @@ -415,7 +415,10 @@ export class DateTime implements INodeType { item = items[i]; if (action === 'format') { - let currentDate = this.getNodeParameter('value', i) as string; + let currentDate: string | number | LuxonDateTime = this.getNodeParameter( + 'value', + i, + ) as string; const dataPropertyName = this.getNodeParameter('dataPropertyName', i); const toFormat = this.getNodeParameter('toFormat', i) as string; const options = this.getNodeParameter('options', i); @@ -425,13 +428,20 @@ export class DateTime implements INodeType { currentDate = (currentDate as unknown as LuxonDateTime).toISO(); } + // Check if the input is a number + if (!Number.isNaN(Number(currentDate))) { + //input is a number, convert to number in case it is a string + currentDate = Number(currentDate); + // check if the number is a timestamp in float format and convert to integer + if (!Number.isInteger(currentDate)) { + currentDate = currentDate * 1000; + } + } + if (currentDate === undefined) { continue; } - if ( - options.fromFormat === undefined && - !moment(currentDate as string | number).isValid() - ) { + if (options.fromFormat === undefined && !moment(currentDate).isValid()) { throw new NodeOperationError( this.getNode(), 'The date input format could not be recognized. Please set the "From Format" field', @@ -439,14 +449,20 @@ export class DateTime implements INodeType { ); } - if (Number.isInteger(currentDate as unknown as number)) { - newDate = moment.unix(currentDate as unknown as number); + if (Number.isInteger(currentDate)) { + const timestampLengthInMilliseconds1990 = 12; + // check if the number is a timestamp in seconds or milliseconds and create a moment object accordingly + if (currentDate.toString().length < timestampLengthInMilliseconds1990) { + newDate = moment.unix(currentDate as number); + } else { + newDate = moment(currentDate); + } } else { if (options.fromTimezone || options.toTimezone) { const fromTimezone = options.fromTimezone || workflowTimezone; if (options.fromFormat) { newDate = moment.tz( - currentDate, + currentDate as string, options.fromFormat as string, fromTimezone as string, ); diff --git a/packages/nodes-base/nodes/DateTime/test/node/DateTimeWorklfow.test.json b/packages/nodes-base/nodes/DateTime/test/node/DateTimeWorklfow.test.json index 124fc5b1d3..9d1d31723f 100644 --- a/packages/nodes-base/nodes/DateTime/test/node/DateTimeWorklfow.test.json +++ b/packages/nodes-base/nodes/DateTime/test/node/DateTimeWorklfow.test.json @@ -1,331 +1,542 @@ { - "name": "My workflow", - "nodes": [ - { - "parameters": {}, - "id": "bd40f2b1-090e-4cf0-8342-0ebcca1089b4", - "name": "When clicking \"Execute Workflow\"", - "type": "n8n-nodes-base.manualTrigger", - "typeVersion": 1, - "position": [ - 40, - -320 - ] - }, - { - "parameters": { - "action": "calculate", - "value": "08/01/2022", - "duration": 10, - "options": {} - }, - "id": "cadf04c8-5900-414e-bf61-46adbf3687c2", - "name": "Calculate Date: Add Day", - "type": "n8n-nodes-base.dateTime", - "typeVersion": 1, - "position": [ - 520, - -400 - ] - }, - { - "parameters": { - "action": "calculate", - "value": "08/01/2022", - "duration": 2, - "timeUnit": "quarters", - "options": {} - }, - "id": "77939e5a-db02-4c85-bf31-b61a017f4f64", - "name": "Calculate Date: Substract Quarter", - "type": "n8n-nodes-base.dateTime", - "typeVersion": 1, - "position": [ - 520, - -40 - ] - }, - { - "parameters": { - "action": "calculate", - "value": "08/01/2022", - "operation": "subtract", - "duration": 2, - "options": {} - }, - "id": "6426aa5b-96ad-4516-a346-b9d0ee68b7bd", - "name": "Calculate Date: Substract Day", - "type": "n8n-nodes-base.dateTime", - "typeVersion": 1, - "position": [ - 520, - -220 - ] - }, - { - "parameters": { - "action": "calculate", - "value": "08/01/2022", - "duration": 2, - "timeUnit": "months", - "options": {} - }, - "id": "de76ce11-7865-4b15-9829-5ed7d6a287eb", - "name": "Calculate Date: Add months", - "type": "n8n-nodes-base.dateTime", - "typeVersion": 1, - "position": [ - 520, - 140 - ] - }, - { - "parameters": { - "action": "calculate", - "value": "08/01/2022", - "operation": "subtract", - "duration": 2, - "timeUnit": "months", - "options": {} - }, - "id": "ccbe4625-e470-45f8-b494-06ee1ecfb1a5", - "name": "Calculate Date: Substract Months", - "type": "n8n-nodes-base.dateTime", - "typeVersion": 1, - "position": [ - 520, - 300 - ] - }, - { - "parameters": { - "value": "08/01/2022", - "toFormat": "YYYY/MM/DD", - "options": {} - }, - "id": "aed1eed3-db4e-431b-be04-488b47880665", - "name": "Calculate Date: Format YYYY/MM/DD", - "type": "n8n-nodes-base.dateTime", - "typeVersion": 1, - "position": [ - 520, - 480 - ] - }, - { - "parameters": { - "value": "08/01/2022", - "toFormat": "YYYY/MM/DD", - "options": { - "fromTimezone": "US/Hawaii" - } - }, - "id": "3bc2aa26-bc98-40c0-be8a-75bc0d58601c", - "name": "Calculate Date: Format YYYY/MM/DD with Timezone", - "type": "n8n-nodes-base.dateTime", - "typeVersion": 1, - "position": [ - 520, - 660 - ] - }, - { - "parameters": { - "value": "08/01/2022", - "toFormat": "YYYY/MM/DD", - "options": { - "fromTimezone": "US/Hawaii", - "toTimezone": "US/Pacific" - } - }, - "id": "e2defb6b-e465-4d5f-9d65-d66ab91345f5", - "name": "Calculate Date: Format YYYY/MM/DD with Timezone1", - "type": "n8n-nodes-base.dateTime", - "typeVersion": 1, - "position": [ - 520, - 840 - ] - }, - { - "parameters": { - "value": "08/01/2022", - "toFormat": "x", - "options": { - "fromTimezone": "US/Hawaii", - "toTimezone": "US/Pacific" - } - }, - "id": "cdf19ab4-aa0c-4cad-8264-bd4356928baf", - "name": "Calculate Date: Format YYYY/MM/DD with Timezone Unix", - "type": "n8n-nodes-base.dateTime", - "typeVersion": 1, - "position": [ - 40, - 200 - ] - }, - { - "parameters": { - "value": "2022-01-12", - "toFormat": "MM-DD-YYYY", - "options": { - "fromFormat": "YYYY-DD-MM", - "fromTimezone": "US/Hawaii", - "toTimezone": "US/Pacific" - } - }, - "id": "3383f04e-f13d-438b-b1c4-1bc09332401c", - "name": "Calculate Date: Format YYYY/MM/DD with Timezone with special zone", - "type": "n8n-nodes-base.dateTime", - "typeVersion": 1, - "position": [ - 40, - 380 - ] - } - ], - "pinData": { - "Calculate Date: Format YYYY/MM/DD with Timezone Unix": [ - { - "json": { - "data": "1659312000000" - } - } - ], - "Calculate Date: Format YYYY/MM/DD with Timezone with special zone": [ - { - "json": { - "data": "12-01-2022" - } - } - ], - "Calculate Date: Add Day": [ - { - "json": { - "data": "2022-08-11T00:00:00.000Z" - } - } - ], - "Calculate Date: Substract Day": [ - { - "json": { - "data": "2022-07-30T00:00:00.000Z" - } - } - ], - "Calculate Date: Substract Quarter": [ - { - "json": { - "data": "2023-02-01T00:00:00.000Z" - } - } - ], - "Calculate Date: Add months": [ - { - "json": { - "data": "2022-10-01T00:00:00.000Z" - } - } - ], - "Calculate Date: Substract Months": [ - { - "json": { - "data": "2022-06-01T00:00:00.000Z" - } - } - ], - "Calculate Date: Format YYYY/MM/DD": [ - { - "json": { - "data": "2022/08/01" - } - } - ], - "Calculate Date: Format YYYY/MM/DD with Timezone": [ - { - "json": { - "data": "2022/07/31" - } - } - ], - "Calculate Date: Format YYYY/MM/DD with Timezone1": [ - { - "json": { - "data": "2022/07/31" - } - } - ] - }, - "connections": { - "When clicking \"Execute Workflow\"": { - "main": [ - [ - { - "node": "Calculate Date: Add Day", - "type": "main", - "index": 0 - }, - { - "node": "Calculate Date: Substract Day", - "type": "main", - "index": 0 - }, - { - "node": "Calculate Date: Substract Quarter", - "type": "main", - "index": 0 - }, - { - "node": "Calculate Date: Add months", - "type": "main", - "index": 0 - }, - { - "node": "Calculate Date: Substract Months", - "type": "main", - "index": 0 - }, - { - "node": "Calculate Date: Format YYYY/MM/DD", - "type": "main", - "index": 0 - }, - { - "node": "Calculate Date: Format YYYY/MM/DD with Timezone", - "type": "main", - "index": 0 - }, - { - "node": "Calculate Date: Format YYYY/MM/DD with Timezone1", - "type": "main", - "index": 0 - }, - { - "node": "Calculate Date: Format YYYY/MM/DD with Timezone Unix", - "type": "main", - "index": 0 - }, - { - "node": "Calculate Date: Format YYYY/MM/DD with Timezone with special zone", - "type": "main", - "index": 0 - } - ] - ] - } - }, - "active": false, - "settings": { - "saveManualExecutions": false, - "callerPolicy": "workflowsFromSameOwner", - "timezone": "America/New_York", - "saveExecutionProgress": "DEFAULT" - }, - "versionId": "2737913c-dd04-438a-ba00-b1ee5f734038", - "id": "230", - "meta": { - "instanceId": "27cc9b56542ad45b38725555722c50a1c3fee1670bbb67980558314ee08517c4" - }, - "tags": [] -} \ No newline at end of file + "name": "My workflow 10", + "nodes": [ + { + "parameters": {}, + "id": "0b90cdc3-807a-4849-b2e2-a017eb77df17", + "name": "When clicking \"Execute Workflow\"", + "type": "n8n-nodes-base.manualTrigger", + "typeVersion": 1, + "position": [20, 1820] + }, + { + "parameters": { + "action": "calculate", + "value": "08/01/2022", + "duration": 10, + "options": {} + }, + "id": "4a7807ca-e44c-46b4-9d2c-3424b1883c61", + "name": "Calculate Date: Add Day", + "type": "n8n-nodes-base.dateTime", + "typeVersion": 1, + "position": [500, 1740] + }, + { + "parameters": { + "action": "calculate", + "value": "08/01/2022", + "duration": 2, + "timeUnit": "quarters", + "options": {} + }, + "id": "04d26b36-9a31-4fc8-bbf4-4b6d8b9304bb", + "name": "Calculate Date: Substract Quarter", + "type": "n8n-nodes-base.dateTime", + "typeVersion": 1, + "position": [500, 2100] + }, + { + "parameters": { + "action": "calculate", + "value": "08/01/2022", + "operation": "subtract", + "duration": 2, + "options": {} + }, + "id": "617145da-26c5-491b-bc58-a10fbb5a1825", + "name": "Calculate Date: Substract Day", + "type": "n8n-nodes-base.dateTime", + "typeVersion": 1, + "position": [500, 1920] + }, + { + "parameters": { + "action": "calculate", + "value": "08/01/2022", + "duration": 2, + "timeUnit": "months", + "options": {} + }, + "id": "c7b4967f-3ae4-452b-8d54-aa1623194f2b", + "name": "Calculate Date: Add months", + "type": "n8n-nodes-base.dateTime", + "typeVersion": 1, + "position": [500, 2280] + }, + { + "parameters": { + "action": "calculate", + "value": "08/01/2022", + "operation": "subtract", + "duration": 2, + "timeUnit": "months", + "options": {} + }, + "id": "a22a536c-bf23-4ff0-a3ad-b3761dfb3add", + "name": "Calculate Date: Substract Months", + "type": "n8n-nodes-base.dateTime", + "typeVersion": 1, + "position": [500, 2440] + }, + { + "parameters": { + "value": "08/01/2022", + "toFormat": "YYYY/MM/DD", + "options": {} + }, + "id": "3ecc8ea0-9605-4017-b5e0-a9ddde4c1a4a", + "name": "Calculate Date: Format YYYY/MM/DD", + "type": "n8n-nodes-base.dateTime", + "typeVersion": 1, + "position": [500, 2620] + }, + { + "parameters": { + "value": "08/01/2022", + "toFormat": "YYYY/MM/DD", + "options": { + "fromTimezone": "US/Hawaii" + } + }, + "id": "c99c7124-c388-4c97-8e6e-8158ba83bddd", + "name": "Calculate Date: Format YYYY/MM/DD with Timezone", + "type": "n8n-nodes-base.dateTime", + "typeVersion": 1, + "position": [500, 2800] + }, + { + "parameters": { + "value": "08/01/2022", + "toFormat": "YYYY/MM/DD", + "options": { + "fromTimezone": "US/Hawaii", + "toTimezone": "US/Pacific" + } + }, + "id": "40abfde6-66f2-44a9-a16f-3d981178da84", + "name": "Calculate Date: Format YYYY/MM/DD with Timezone1", + "type": "n8n-nodes-base.dateTime", + "typeVersion": 1, + "position": [500, 2980] + }, + { + "parameters": { + "value": "08/01/2022", + "toFormat": "x", + "options": { + "fromTimezone": "US/Hawaii", + "toTimezone": "US/Pacific" + } + }, + "id": "20ea9e76-d656-406f-8e3d-a51712c2657d", + "name": "Calculate Date: Format YYYY/MM/DD with Timezone Unix", + "type": "n8n-nodes-base.dateTime", + "typeVersion": 1, + "position": [20, 2340] + }, + { + "parameters": { + "value": "2022-01-12", + "toFormat": "MM-DD-YYYY", + "options": { + "fromFormat": "YYYY-DD-MM", + "fromTimezone": "US/Hawaii", + "toTimezone": "US/Pacific" + } + }, + "id": "53ddcd66-3cb5-47bb-bd59-64a70fc599b7", + "name": "Calculate Date: Format YYYY/MM/DD with Timezone with special zone", + "type": "n8n-nodes-base.dateTime", + "typeVersion": 1, + "position": [20, 2520] + }, + { + "parameters": { + "functionCode": "return [\n {\n \"Id\": \"18162\",\n \"Start_time\": 1663801200000,\n \"End_time\": 1663804800000,\n \"Room\": \" The Stadium\"\n },\n {\n \"Id\": \"18173\",\n \"Start_time\": 1663797600000,\n \"End_time\": 1663801200000,\n \"Room\": \" The Stadium\"\n },\n {\n \"Id\": \"18178\",\n \"Start_time\": 1663804800000,\n \"End_time\": 1663808400000,\n \"Room\": \" The Stadium\"\n },\n {\n \"Id\": \"18182\",\n \"Start_time\": 1663801200000,\n \"End_time\": 1663804800000,\n \"Room\": \" The Garden\"\n }\n]" + }, + "id": "0933e36d-43f4-46b5-8c3f-8d397d93a24c", + "name": "Mock Data", + "type": "n8n-nodes-base.function", + "typeVersion": 1, + "position": [-140, 1200] + }, + { + "parameters": { + "value": "1663801200000", + "options": { + "fromFormat": "x", + "toTimezone": "UTC" + } + }, + "id": "35eae914-b744-4a0b-a9ac-eab8bd685f02", + "name": "Fixed Value", + "type": "n8n-nodes-base.dateTime", + "typeVersion": 1, + "position": [160, 1080] + }, + { + "parameters": { + "value": "={{parseInt(1663801200000)}}", + "options": { + "fromFormat": "x", + "toTimezone": "UTC" + } + }, + "id": "e7d16772-843d-43da-a411-ee46253619e8", + "name": "parseInt on fixed", + "type": "n8n-nodes-base.dateTime", + "typeVersion": 1, + "position": [160, 1580] + }, + { + "parameters": { + "value": "={{ $json[\"Start_time\"] }}", + "options": { + "fromFormat": "x", + "toTimezone": "UTC" + } + }, + "id": "daf8a9da-7cab-4bb6-91fd-9a7315ecc61b", + "name": "Without toString()", + "type": "n8n-nodes-base.dateTime", + "typeVersion": 1, + "position": [160, 1400] + }, + { + "parameters": { + "value": "={{ $json[\"Start_time\"].toString() }}", + "options": { + "fromFormat": "x", + "toTimezone": "UTC" + } + }, + "id": "bc536546-4968-4b88-acaa-9a02bc013246", + "name": "With toString", + "type": "n8n-nodes-base.dateTime", + "typeVersion": 1, + "position": [160, 880] + } + ], + "pinData": { + "Calculate Date: Format YYYY/MM/DD with Timezone Unix": [ + { + "json": { + "data": "1659312000000" + } + } + ], + "Calculate Date: Format YYYY/MM/DD with Timezone with special zone": [ + { + "json": { + "data": "12-01-2022" + } + } + ], + "Calculate Date: Add Day": [ + { + "json": { + "data": "2022-08-11T00:00:00.000Z" + } + } + ], + "Calculate Date: Substract Day": [ + { + "json": { + "data": "2022-07-30T00:00:00.000Z" + } + } + ], + "Calculate Date: Substract Quarter": [ + { + "json": { + "data": "2023-02-01T00:00:00.000Z" + } + } + ], + "Calculate Date: Add months": [ + { + "json": { + "data": "2022-10-01T00:00:00.000Z" + } + } + ], + "Calculate Date: Substract Months": [ + { + "json": { + "data": "2022-06-01T00:00:00.000Z" + } + } + ], + "Calculate Date: Format YYYY/MM/DD": [ + { + "json": { + "data": "2022/08/01" + } + } + ], + "Calculate Date: Format YYYY/MM/DD with Timezone": [ + { + "json": { + "data": "2022/07/31" + } + } + ], + "Calculate Date: Format YYYY/MM/DD with Timezone1": [ + { + "json": { + "data": "2022/07/31" + } + } + ], + "With toString": [ + { + "json": { + "Id": "18162", + "Start_time": 1663801200000, + "End_time": 1663804800000, + "Room": " The Stadium", + "data": "09/21/2022" + } + }, + { + "json": { + "Id": "18173", + "Start_time": 1663797600000, + "End_time": 1663801200000, + "Room": " The Stadium", + "data": "09/21/2022" + } + }, + { + "json": { + "Id": "18178", + "Start_time": 1663804800000, + "End_time": 1663808400000, + "Room": " The Stadium", + "data": "09/22/2022" + } + }, + { + "json": { + "Id": "18182", + "Start_time": 1663801200000, + "End_time": 1663804800000, + "Room": " The Garden", + "data": "09/21/2022" + } + } + ], + "Fixed Value": [ + { + "json": { + "Id": "18162", + "Start_time": 1663801200000, + "End_time": 1663804800000, + "Room": " The Stadium", + "data": "09/21/2022" + } + }, + { + "json": { + "Id": "18173", + "Start_time": 1663797600000, + "End_time": 1663801200000, + "Room": " The Stadium", + "data": "09/21/2022" + } + }, + { + "json": { + "Id": "18178", + "Start_time": 1663804800000, + "End_time": 1663808400000, + "Room": " The Stadium", + "data": "09/21/2022" + } + }, + { + "json": { + "Id": "18182", + "Start_time": 1663801200000, + "End_time": 1663804800000, + "Room": " The Garden", + "data": "09/21/2022" + } + } + ], + "Without toString()": [ + { + "json": { + "Id": "18162", + "Start_time": 1663801200000, + "End_time": 1663804800000, + "Room": " The Stadium", + "data": "09/21/2022" + } + }, + { + "json": { + "Id": "18173", + "Start_time": 1663797600000, + "End_time": 1663801200000, + "Room": " The Stadium", + "data": "09/21/2022" + } + }, + { + "json": { + "Id": "18178", + "Start_time": 1663804800000, + "End_time": 1663808400000, + "Room": " The Stadium", + "data": "09/22/2022" + } + }, + { + "json": { + "Id": "18182", + "Start_time": 1663801200000, + "End_time": 1663804800000, + "Room": " The Garden", + "data": "09/21/2022" + } + } + ], + "parseInt on fixed": [ + { + "json": { + "Id": "18162", + "Start_time": 1663801200000, + "End_time": 1663804800000, + "Room": " The Stadium", + "data": "09/21/2022" + } + }, + { + "json": { + "Id": "18173", + "Start_time": 1663797600000, + "End_time": 1663801200000, + "Room": " The Stadium", + "data": "09/21/2022" + } + }, + { + "json": { + "Id": "18178", + "Start_time": 1663804800000, + "End_time": 1663808400000, + "Room": " The Stadium", + "data": "09/21/2022" + } + }, + { + "json": { + "Id": "18182", + "Start_time": 1663801200000, + "End_time": 1663804800000, + "Room": " The Garden", + "data": "09/21/2022" + } + } + ] + }, + "connections": { + "When clicking \"Execute Workflow\"": { + "main": [ + [ + { + "node": "Calculate Date: Add Day", + "type": "main", + "index": 0 + }, + { + "node": "Calculate Date: Substract Day", + "type": "main", + "index": 0 + }, + { + "node": "Calculate Date: Substract Quarter", + "type": "main", + "index": 0 + }, + { + "node": "Calculate Date: Add months", + "type": "main", + "index": 0 + }, + { + "node": "Calculate Date: Substract Months", + "type": "main", + "index": 0 + }, + { + "node": "Calculate Date: Format YYYY/MM/DD", + "type": "main", + "index": 0 + }, + { + "node": "Calculate Date: Format YYYY/MM/DD with Timezone", + "type": "main", + "index": 0 + }, + { + "node": "Calculate Date: Format YYYY/MM/DD with Timezone1", + "type": "main", + "index": 0 + }, + { + "node": "Calculate Date: Format YYYY/MM/DD with Timezone Unix", + "type": "main", + "index": 0 + }, + { + "node": "Calculate Date: Format YYYY/MM/DD with Timezone with special zone", + "type": "main", + "index": 0 + }, + { + "node": "Mock Data", + "type": "main", + "index": 0 + } + ] + ] + }, + "Mock Data": { + "main": [ + [ + { + "node": "With toString", + "type": "main", + "index": 0 + }, + { + "node": "Without toString()", + "type": "main", + "index": 0 + }, + { + "node": "Fixed Value", + "type": "main", + "index": 0 + }, + { + "node": "parseInt on fixed", + "type": "main", + "index": 0 + } + ] + ] + } + }, + "active": false, + "settings": {}, + "versionId": "8ccd9e22-634a-4fc1-b41b-1a63062557e6", + "id": "151", + "meta": { + "instanceId": "36203ea1ce3cef713fa25999bd9874ae26b9e4c2c3a90a365f2882a154d031d0" + }, + "tags": [] +} diff --git a/packages/nodes-base/nodes/DateTime/test/node/workflow.timestamp.json b/packages/nodes-base/nodes/DateTime/test/node/workflow.timestamp.json new file mode 100644 index 0000000000..6894f69989 --- /dev/null +++ b/packages/nodes-base/nodes/DateTime/test/node/workflow.timestamp.json @@ -0,0 +1,393 @@ +{ + "name": "date time", + "nodes": [ + { + "parameters": {}, + "id": "7192e181-4384-430d-a25c-25beb0ae6b1f", + "name": "When clicking \"Execute Workflow\"", + "type": "n8n-nodes-base.manualTrigger", + "typeVersion": 1, + "position": [-100, 1040] + }, + { + "parameters": { + "values": { + "number": [ + { + "name": "dateMilis", + "value": 1682918315906 + }, + { + "name": "dateMilisFloat", + "value": 1682918315.906 + }, + { + "name": "dateUnix", + "value": 1682918315 + } + ], + "string": [ + { + "name": "dateMilisStr", + "value": "1682918315906" + }, + { + "name": "dateMilisFloatStr", + "value": "1682918315.906" + }, + { + "name": "dateUnixStr", + "value": "1682918315" + } + ] + }, + "options": {} + }, + "id": "dc933b29-a770-43b8-aa20-a8e82b0d034f", + "name": "Set", + "type": "n8n-nodes-base.set", + "typeVersion": 2, + "position": [60, 1040] + }, + { + "parameters": { + "value": "={{ $json.dateMilis }}", + "options": {} + }, + "id": "2bcbc9d8-af2f-4c44-b47e-80a9462350d0", + "name": "Date & Time", + "type": "n8n-nodes-base.dateTime", + "typeVersion": 1, + "position": [360, 560] + }, + { + "parameters": { + "keepOnlySet": true, + "values": { + "string": [ + { + "name": "data", + "value": "={{ $json.data }}" + } + ] + }, + "options": {} + }, + "id": "c1b947a8-45c6-4c6a-b4ce-467d57de6d50", + "name": "Set1", + "type": "n8n-nodes-base.set", + "typeVersion": 2, + "position": [580, 560] + }, + { + "parameters": { + "value": "={{ $json.dateMilisFloat }}", + "options": {} + }, + "id": "a91fc3d9-afb8-4c78-ad0b-2078639708da", + "name": "Date & Time1", + "type": "n8n-nodes-base.dateTime", + "typeVersion": 1, + "position": [360, 740] + }, + { + "parameters": { + "keepOnlySet": true, + "values": { + "string": [ + { + "name": "data", + "value": "={{ $json.data }}" + } + ] + }, + "options": {} + }, + "id": "370b58aa-555f-4dc7-9c48-564bddfcbe33", + "name": "Set2", + "type": "n8n-nodes-base.set", + "typeVersion": 2, + "position": [580, 740] + }, + { + "parameters": { + "value": "={{ $json.dateUnix }}", + "options": {} + }, + "id": "91d1e77d-3d25-4e87-9af8-f756ace4abcf", + "name": "Date & Time2", + "type": "n8n-nodes-base.dateTime", + "typeVersion": 1, + "position": [360, 940] + }, + { + "parameters": { + "keepOnlySet": true, + "values": { + "string": [ + { + "name": "data", + "value": "={{ $json.data }}" + } + ] + }, + "options": {} + }, + "id": "77cdf5fa-641e-46e1-8cb9-00160773b4b2", + "name": "Set3", + "type": "n8n-nodes-base.set", + "typeVersion": 2, + "position": [580, 940] + }, + { + "parameters": { + "value": "={{ $json.dateMilisStr }}", + "options": {} + }, + "id": "084e7b19-f03e-42a9-b4df-865f2f6610de", + "name": "Date & Time3", + "type": "n8n-nodes-base.dateTime", + "typeVersion": 1, + "position": [360, 1120] + }, + { + "parameters": { + "keepOnlySet": true, + "values": { + "string": [ + { + "name": "data", + "value": "={{ $json.data }}" + } + ] + }, + "options": {} + }, + "id": "eb46b668-2ebc-47ee-adca-a8f99205ac26", + "name": "Set4", + "type": "n8n-nodes-base.set", + "typeVersion": 2, + "position": [580, 1120] + }, + { + "parameters": { + "value": "={{ $json.dateMilisFloatStr }}", + "options": {} + }, + "id": "9cb46fb5-e6e4-4fb3-859a-8cd26bebf1c9", + "name": "Date & Time4", + "type": "n8n-nodes-base.dateTime", + "typeVersion": 1, + "position": [360, 1300] + }, + { + "parameters": { + "keepOnlySet": true, + "values": { + "string": [ + { + "name": "data", + "value": "={{ $json.data }}" + } + ] + }, + "options": {} + }, + "id": "0d09dc35-d572-41f5-984c-30a66184b80a", + "name": "Set5", + "type": "n8n-nodes-base.set", + "typeVersion": 2, + "position": [580, 1300] + }, + { + "parameters": { + "value": "={{ $json.dateUnixStr }}", + "options": {} + }, + "id": "208e26b1-db01-417b-b21f-fcb8198a1e27", + "name": "Date & Time5", + "type": "n8n-nodes-base.dateTime", + "typeVersion": 1, + "position": [360, 1480] + }, + { + "parameters": { + "keepOnlySet": true, + "values": { + "string": [ + { + "name": "data", + "value": "={{ $json.data }}" + } + ] + }, + "options": {} + }, + "id": "1076029a-91a7-4121-aadc-e9dde57b3d56", + "name": "Set6", + "type": "n8n-nodes-base.set", + "typeVersion": 2, + "position": [580, 1480] + } + ], + "pinData": { + "Set1": [ + { + "json": { + "data": "05/01/2023" + } + } + ], + "Set2": [ + { + "json": { + "data": "05/01/2023" + } + } + ], + "Set4": [ + { + "json": { + "data": "05/01/2023" + } + } + ], + "Set5": [ + { + "json": { + "data": "05/01/2023" + } + } + ], + "Set6": [ + { + "json": { + "data": "05/01/2023" + } + } + ] + }, + "connections": { + "When clicking \"Execute Workflow\"": { + "main": [ + [ + { + "node": "Set", + "type": "main", + "index": 0 + } + ] + ] + }, + "Set": { + "main": [ + [ + { + "node": "Date & Time", + "type": "main", + "index": 0 + }, + { + "node": "Date & Time1", + "type": "main", + "index": 0 + }, + { + "node": "Date & Time2", + "type": "main", + "index": 0 + }, + { + "node": "Date & Time3", + "type": "main", + "index": 0 + }, + { + "node": "Date & Time4", + "type": "main", + "index": 0 + }, + { + "node": "Date & Time5", + "type": "main", + "index": 0 + } + ] + ] + }, + "Date & Time": { + "main": [ + [ + { + "node": "Set1", + "type": "main", + "index": 0 + } + ] + ] + }, + "Date & Time1": { + "main": [ + [ + { + "node": "Set2", + "type": "main", + "index": 0 + } + ] + ] + }, + "Date & Time2": { + "main": [ + [ + { + "node": "Set3", + "type": "main", + "index": 0 + } + ] + ] + }, + "Date & Time3": { + "main": [ + [ + { + "node": "Set4", + "type": "main", + "index": 0 + } + ] + ] + }, + "Date & Time4": { + "main": [ + [ + { + "node": "Set5", + "type": "main", + "index": 0 + } + ] + ] + }, + "Date & Time5": { + "main": [ + [ + { + "node": "Set6", + "type": "main", + "index": 0 + } + ] + ] + } + }, + "active": false, + "settings": {}, + "versionId": "d11f32bd-0d35-4aeb-9b0c-c4cac94f6445", + "id": "12", + "meta": { + "instanceId": "6ebec4953fe56f1c009e7c3b107578b375137523af057073c0b5da17350651bd" + }, + "tags": [] +}