DateTime error (Calculate)

Hello,
Previously I used to use the luxon date expression but now that I have started using the ‘execute another workflow’ node, my method have not been working. Since my usual way don’t work anymore, I started using the ‘Date and Time’ node. However, now Im having some issues figuring out how to add the date.

I want to set the deadline of a task to be due on the 7th day 23:59.

Here is my current workflow:

Hey @ruby09, so you are getting a date value from your Telegram node (in the result.date field) and would like to add 7 days, 23 hours and 59 minutes to it?

Adding days, hours and minutes separately would for example do the job like so:

I am not a Telegram user so might have missed something though. Perhaps you could share the JSON output from your Telegram node? That’d make it easier to reproduce your problem.

Thank you so much for your help! I have managed to solve my issue!

Hello @MutedJam ,
Here is the JSON output from Telegram Node.
{
“message_id”: 353,
“from”: {
“id”: 555555552,
“is_bot”: true,
“first_name”: “n8n”,
“username”: “n8n_bot”
},
“chat”: {
“id”: 91777779,
“first_name”: “Ruby”,
“username”: “ruby_12”,
“type”: “private”
},
“date”: 1655428157,
“text”: “hi”
}

I have another issue now, your solution works but I want my deadline to be 7th day 23:59.However, when I try to format my datetime, it does not give the required outcome.

image
Here the data value is 25 June 07:59 but I want it to be 24 June 23:59. Is there anyway to get such a result?

@MutedJam,
do you mind helping me out for this issue, that I’m facing.

Here the data value is 25 June 07:59 but I want it to be 24 June 23:59. Is there anyway to get such a result?

Sounds like you simply need to add 8 hours less. Is that not working for you?

1 Like