fix(Date & Time Node): Numbers conversions fix

This commit is contained in:
Michael Kret 2023-05-01 10:11:55 +03:00 committed by GitHub
parent d219af75cf
commit 14f71146e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 958 additions and 338 deletions

View file

@ -415,7 +415,10 @@ export class DateTime implements INodeType {
item = items[i]; item = items[i];
if (action === 'format') { 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 dataPropertyName = this.getNodeParameter('dataPropertyName', i);
const toFormat = this.getNodeParameter('toFormat', i) as string; const toFormat = this.getNodeParameter('toFormat', i) as string;
const options = this.getNodeParameter('options', i); const options = this.getNodeParameter('options', i);
@ -425,13 +428,20 @@ export class DateTime implements INodeType {
currentDate = (currentDate as unknown as LuxonDateTime).toISO(); 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) { if (currentDate === undefined) {
continue; continue;
} }
if ( if (options.fromFormat === undefined && !moment(currentDate).isValid()) {
options.fromFormat === undefined &&
!moment(currentDate as string | number).isValid()
) {
throw new NodeOperationError( throw new NodeOperationError(
this.getNode(), this.getNode(),
'The date input format could not be recognized. Please set the "From Format" field', '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)) { if (Number.isInteger(currentDate)) {
newDate = moment.unix(currentDate as unknown as number); 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 { } else {
if (options.fromTimezone || options.toTimezone) { if (options.fromTimezone || options.toTimezone) {
const fromTimezone = options.fromTimezone || workflowTimezone; const fromTimezone = options.fromTimezone || workflowTimezone;
if (options.fromFormat) { if (options.fromFormat) {
newDate = moment.tz( newDate = moment.tz(
currentDate, currentDate as string,
options.fromFormat as string, options.fromFormat as string,
fromTimezone as string, fromTimezone as string,
); );

View file

@ -1,331 +1,542 @@
{ {
"name": "My workflow", "name": "My workflow 10",
"nodes": [ "nodes": [
{ {
"parameters": {}, "parameters": {},
"id": "bd40f2b1-090e-4cf0-8342-0ebcca1089b4", "id": "0b90cdc3-807a-4849-b2e2-a017eb77df17",
"name": "When clicking \"Execute Workflow\"", "name": "When clicking \"Execute Workflow\"",
"type": "n8n-nodes-base.manualTrigger", "type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1, "typeVersion": 1,
"position": [ "position": [20, 1820]
40, },
-320 {
] "parameters": {
}, "action": "calculate",
{ "value": "08/01/2022",
"parameters": { "duration": 10,
"action": "calculate", "options": {}
"value": "08/01/2022", },
"duration": 10, "id": "4a7807ca-e44c-46b4-9d2c-3424b1883c61",
"options": {} "name": "Calculate Date: Add Day",
}, "type": "n8n-nodes-base.dateTime",
"id": "cadf04c8-5900-414e-bf61-46adbf3687c2", "typeVersion": 1,
"name": "Calculate Date: Add Day", "position": [500, 1740]
"type": "n8n-nodes-base.dateTime", },
"typeVersion": 1, {
"position": [ "parameters": {
520, "action": "calculate",
-400 "value": "08/01/2022",
] "duration": 2,
}, "timeUnit": "quarters",
{ "options": {}
"parameters": { },
"action": "calculate", "id": "04d26b36-9a31-4fc8-bbf4-4b6d8b9304bb",
"value": "08/01/2022", "name": "Calculate Date: Substract Quarter",
"duration": 2, "type": "n8n-nodes-base.dateTime",
"timeUnit": "quarters", "typeVersion": 1,
"options": {} "position": [500, 2100]
}, },
"id": "77939e5a-db02-4c85-bf31-b61a017f4f64", {
"name": "Calculate Date: Substract Quarter", "parameters": {
"type": "n8n-nodes-base.dateTime", "action": "calculate",
"typeVersion": 1, "value": "08/01/2022",
"position": [ "operation": "subtract",
520, "duration": 2,
-40 "options": {}
] },
}, "id": "617145da-26c5-491b-bc58-a10fbb5a1825",
{ "name": "Calculate Date: Substract Day",
"parameters": { "type": "n8n-nodes-base.dateTime",
"action": "calculate", "typeVersion": 1,
"value": "08/01/2022", "position": [500, 1920]
"operation": "subtract", },
"duration": 2, {
"options": {} "parameters": {
}, "action": "calculate",
"id": "6426aa5b-96ad-4516-a346-b9d0ee68b7bd", "value": "08/01/2022",
"name": "Calculate Date: Substract Day", "duration": 2,
"type": "n8n-nodes-base.dateTime", "timeUnit": "months",
"typeVersion": 1, "options": {}
"position": [ },
520, "id": "c7b4967f-3ae4-452b-8d54-aa1623194f2b",
-220 "name": "Calculate Date: Add months",
] "type": "n8n-nodes-base.dateTime",
}, "typeVersion": 1,
{ "position": [500, 2280]
"parameters": { },
"action": "calculate", {
"value": "08/01/2022", "parameters": {
"duration": 2, "action": "calculate",
"timeUnit": "months", "value": "08/01/2022",
"options": {} "operation": "subtract",
}, "duration": 2,
"id": "de76ce11-7865-4b15-9829-5ed7d6a287eb", "timeUnit": "months",
"name": "Calculate Date: Add months", "options": {}
"type": "n8n-nodes-base.dateTime", },
"typeVersion": 1, "id": "a22a536c-bf23-4ff0-a3ad-b3761dfb3add",
"position": [ "name": "Calculate Date: Substract Months",
520, "type": "n8n-nodes-base.dateTime",
140 "typeVersion": 1,
] "position": [500, 2440]
}, },
{ {
"parameters": { "parameters": {
"action": "calculate", "value": "08/01/2022",
"value": "08/01/2022", "toFormat": "YYYY/MM/DD",
"operation": "subtract", "options": {}
"duration": 2, },
"timeUnit": "months", "id": "3ecc8ea0-9605-4017-b5e0-a9ddde4c1a4a",
"options": {} "name": "Calculate Date: Format YYYY/MM/DD",
}, "type": "n8n-nodes-base.dateTime",
"id": "ccbe4625-e470-45f8-b494-06ee1ecfb1a5", "typeVersion": 1,
"name": "Calculate Date: Substract Months", "position": [500, 2620]
"type": "n8n-nodes-base.dateTime", },
"typeVersion": 1, {
"position": [ "parameters": {
520, "value": "08/01/2022",
300 "toFormat": "YYYY/MM/DD",
] "options": {
}, "fromTimezone": "US/Hawaii"
{ }
"parameters": { },
"value": "08/01/2022", "id": "c99c7124-c388-4c97-8e6e-8158ba83bddd",
"toFormat": "YYYY/MM/DD", "name": "Calculate Date: Format YYYY/MM/DD with Timezone",
"options": {} "type": "n8n-nodes-base.dateTime",
}, "typeVersion": 1,
"id": "aed1eed3-db4e-431b-be04-488b47880665", "position": [500, 2800]
"name": "Calculate Date: Format YYYY/MM/DD", },
"type": "n8n-nodes-base.dateTime", {
"typeVersion": 1, "parameters": {
"position": [ "value": "08/01/2022",
520, "toFormat": "YYYY/MM/DD",
480 "options": {
] "fromTimezone": "US/Hawaii",
}, "toTimezone": "US/Pacific"
{ }
"parameters": { },
"value": "08/01/2022", "id": "40abfde6-66f2-44a9-a16f-3d981178da84",
"toFormat": "YYYY/MM/DD", "name": "Calculate Date: Format YYYY/MM/DD with Timezone1",
"options": { "type": "n8n-nodes-base.dateTime",
"fromTimezone": "US/Hawaii" "typeVersion": 1,
} "position": [500, 2980]
}, },
"id": "3bc2aa26-bc98-40c0-be8a-75bc0d58601c", {
"name": "Calculate Date: Format YYYY/MM/DD with Timezone", "parameters": {
"type": "n8n-nodes-base.dateTime", "value": "08/01/2022",
"typeVersion": 1, "toFormat": "x",
"position": [ "options": {
520, "fromTimezone": "US/Hawaii",
660 "toTimezone": "US/Pacific"
] }
}, },
{ "id": "20ea9e76-d656-406f-8e3d-a51712c2657d",
"parameters": { "name": "Calculate Date: Format YYYY/MM/DD with Timezone Unix",
"value": "08/01/2022", "type": "n8n-nodes-base.dateTime",
"toFormat": "YYYY/MM/DD", "typeVersion": 1,
"options": { "position": [20, 2340]
"fromTimezone": "US/Hawaii", },
"toTimezone": "US/Pacific" {
} "parameters": {
}, "value": "2022-01-12",
"id": "e2defb6b-e465-4d5f-9d65-d66ab91345f5", "toFormat": "MM-DD-YYYY",
"name": "Calculate Date: Format YYYY/MM/DD with Timezone1", "options": {
"type": "n8n-nodes-base.dateTime", "fromFormat": "YYYY-DD-MM",
"typeVersion": 1, "fromTimezone": "US/Hawaii",
"position": [ "toTimezone": "US/Pacific"
520, }
840 },
] "id": "53ddcd66-3cb5-47bb-bd59-64a70fc599b7",
}, "name": "Calculate Date: Format YYYY/MM/DD with Timezone with special zone",
{ "type": "n8n-nodes-base.dateTime",
"parameters": { "typeVersion": 1,
"value": "08/01/2022", "position": [20, 2520]
"toFormat": "x", },
"options": { {
"fromTimezone": "US/Hawaii", "parameters": {
"toTimezone": "US/Pacific" "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",
"id": "cdf19ab4-aa0c-4cad-8264-bd4356928baf", "name": "Mock Data",
"name": "Calculate Date: Format YYYY/MM/DD with Timezone Unix", "type": "n8n-nodes-base.function",
"type": "n8n-nodes-base.dateTime", "typeVersion": 1,
"typeVersion": 1, "position": [-140, 1200]
"position": [ },
40, {
200 "parameters": {
] "value": "1663801200000",
}, "options": {
{ "fromFormat": "x",
"parameters": { "toTimezone": "UTC"
"value": "2022-01-12", }
"toFormat": "MM-DD-YYYY", },
"options": { "id": "35eae914-b744-4a0b-a9ac-eab8bd685f02",
"fromFormat": "YYYY-DD-MM", "name": "Fixed Value",
"fromTimezone": "US/Hawaii", "type": "n8n-nodes-base.dateTime",
"toTimezone": "US/Pacific" "typeVersion": 1,
} "position": [160, 1080]
}, },
"id": "3383f04e-f13d-438b-b1c4-1bc09332401c", {
"name": "Calculate Date: Format YYYY/MM/DD with Timezone with special zone", "parameters": {
"type": "n8n-nodes-base.dateTime", "value": "={{parseInt(1663801200000)}}",
"typeVersion": 1, "options": {
"position": [ "fromFormat": "x",
40, "toTimezone": "UTC"
380 }
] },
} "id": "e7d16772-843d-43da-a411-ee46253619e8",
], "name": "parseInt on fixed",
"pinData": { "type": "n8n-nodes-base.dateTime",
"Calculate Date: Format YYYY/MM/DD with Timezone Unix": [ "typeVersion": 1,
{ "position": [160, 1580]
"json": { },
"data": "1659312000000" {
} "parameters": {
} "value": "={{ $json[\"Start_time\"] }}",
], "options": {
"Calculate Date: Format YYYY/MM/DD with Timezone with special zone": [ "fromFormat": "x",
{ "toTimezone": "UTC"
"json": { }
"data": "12-01-2022" },
} "id": "daf8a9da-7cab-4bb6-91fd-9a7315ecc61b",
} "name": "Without toString()",
], "type": "n8n-nodes-base.dateTime",
"Calculate Date: Add Day": [ "typeVersion": 1,
{ "position": [160, 1400]
"json": { },
"data": "2022-08-11T00:00:00.000Z" {
} "parameters": {
} "value": "={{ $json[\"Start_time\"].toString() }}",
], "options": {
"Calculate Date: Substract Day": [ "fromFormat": "x",
{ "toTimezone": "UTC"
"json": { }
"data": "2022-07-30T00:00:00.000Z" },
} "id": "bc536546-4968-4b88-acaa-9a02bc013246",
} "name": "With toString",
], "type": "n8n-nodes-base.dateTime",
"Calculate Date: Substract Quarter": [ "typeVersion": 1,
{ "position": [160, 880]
"json": { }
"data": "2023-02-01T00:00:00.000Z" ],
} "pinData": {
} "Calculate Date: Format YYYY/MM/DD with Timezone Unix": [
], {
"Calculate Date: Add months": [ "json": {
{ "data": "1659312000000"
"json": { }
"data": "2022-10-01T00:00:00.000Z" }
} ],
} "Calculate Date: Format YYYY/MM/DD with Timezone with special zone": [
], {
"Calculate Date: Substract Months": [ "json": {
{ "data": "12-01-2022"
"json": { }
"data": "2022-06-01T00:00:00.000Z" }
} ],
} "Calculate Date: Add Day": [
], {
"Calculate Date: Format YYYY/MM/DD": [ "json": {
{ "data": "2022-08-11T00:00:00.000Z"
"json": { }
"data": "2022/08/01" }
} ],
} "Calculate Date: Substract Day": [
], {
"Calculate Date: Format YYYY/MM/DD with Timezone": [ "json": {
{ "data": "2022-07-30T00:00:00.000Z"
"json": { }
"data": "2022/07/31" }
} ],
} "Calculate Date: Substract Quarter": [
], {
"Calculate Date: Format YYYY/MM/DD with Timezone1": [ "json": {
{ "data": "2023-02-01T00:00:00.000Z"
"json": { }
"data": "2022/07/31" }
} ],
} "Calculate Date: Add months": [
] {
}, "json": {
"connections": { "data": "2022-10-01T00:00:00.000Z"
"When clicking \"Execute Workflow\"": { }
"main": [ }
[ ],
{ "Calculate Date: Substract Months": [
"node": "Calculate Date: Add Day", {
"type": "main", "json": {
"index": 0 "data": "2022-06-01T00:00:00.000Z"
}, }
{ }
"node": "Calculate Date: Substract Day", ],
"type": "main", "Calculate Date: Format YYYY/MM/DD": [
"index": 0 {
}, "json": {
{ "data": "2022/08/01"
"node": "Calculate Date: Substract Quarter", }
"type": "main", }
"index": 0 ],
}, "Calculate Date: Format YYYY/MM/DD with Timezone": [
{ {
"node": "Calculate Date: Add months", "json": {
"type": "main", "data": "2022/07/31"
"index": 0 }
}, }
{ ],
"node": "Calculate Date: Substract Months", "Calculate Date: Format YYYY/MM/DD with Timezone1": [
"type": "main", {
"index": 0 "json": {
}, "data": "2022/07/31"
{ }
"node": "Calculate Date: Format YYYY/MM/DD", }
"type": "main", ],
"index": 0 "With toString": [
}, {
{ "json": {
"node": "Calculate Date: Format YYYY/MM/DD with Timezone", "Id": "18162",
"type": "main", "Start_time": 1663801200000,
"index": 0 "End_time": 1663804800000,
}, "Room": " The Stadium",
{ "data": "09/21/2022"
"node": "Calculate Date: Format YYYY/MM/DD with Timezone1", }
"type": "main", },
"index": 0 {
}, "json": {
{ "Id": "18173",
"node": "Calculate Date: Format YYYY/MM/DD with Timezone Unix", "Start_time": 1663797600000,
"type": "main", "End_time": 1663801200000,
"index": 0 "Room": " The Stadium",
}, "data": "09/21/2022"
{ }
"node": "Calculate Date: Format YYYY/MM/DD with Timezone with special zone", },
"type": "main", {
"index": 0 "json": {
} "Id": "18178",
] "Start_time": 1663804800000,
] "End_time": 1663808400000,
} "Room": " The Stadium",
}, "data": "09/22/2022"
"active": false, }
"settings": { },
"saveManualExecutions": false, {
"callerPolicy": "workflowsFromSameOwner", "json": {
"timezone": "America/New_York", "Id": "18182",
"saveExecutionProgress": "DEFAULT" "Start_time": 1663801200000,
}, "End_time": 1663804800000,
"versionId": "2737913c-dd04-438a-ba00-b1ee5f734038", "Room": " The Garden",
"id": "230", "data": "09/21/2022"
"meta": { }
"instanceId": "27cc9b56542ad45b38725555722c50a1c3fee1670bbb67980558314ee08517c4" }
}, ],
"tags": [] "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": []
}

View file

@ -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": []
}