Hi @nisha_rathi , you’re welcome. The above was the general answer to handling multiple formats but on further thought there was a simpler solution and it could be achieved with a single String to Date&Time node using the following format mask instead:
[yyyy-MM-dd][dd-MM-yyyy]
The square brackets make parts of the mask optional and so the node would be able to work with both your formats in one go.