Date&Time shift node - month February

Hello,

I have a question regarding the: Date&Time shift node.
I wanted to go back 12 months from the date I give. It is ok for all the months but not for February. when the date is 28/02/2021 date-12 months is 28/02/2020 but 02/2020 has 29 days. how can I solve this problem please?

1 Like

Hello @chanoufi_marwa,

but what is your goal/desired output cause I don’t understand where is the problem? Node shifts 28/02/2021 to 28/02/2020 with your configuration and that seems expected to me.

Br,
Ivan

after posting the question I had the idea to work with first day of the month and it is fine for me. my goal is to have date -12 months but to have the max date of month -12.

Hi @chanoufi_marwa,

I see. You’ll need additional logic to accomplish that. So can you work with first day of month or you rather want to have last day of month? If so I can make draft some example…

Br,
Ivan

1 Like

You seem to already have :slight_smile:

2 Likes

Hello @mlauber71,

indeed I do :sweat_smile: Tnx for sharing it!

Br,
Ivan

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.