Beware that if the day and month of original date are both not greater than 13, such as 2.4.2024, the first convertible format will be applied.
In above expression, “d.M.yyyy” is met first and the output will be Apr 02, 2024.
What if the original date is presenting 2024 Feb 04?
If the array syntax is changed to {“d MMM yyyy”, “M/d/yyyy”, “d/M/yyyy”, “M.d.yyyy”, “d.M.yyyy”}, “M.d.yyyy” is met first and the output will be Feb 04, 2024.
Wondering any solutions on this.
Specifying that many formats within an array is also not an good practice. Rather than that we can go with a single date format and parse it to the required date format right.
As per given input I have give the syntax, if the user has that format of dates also, then all the required formats must be given.
Hi @lrtetala ,
I have one doubt like for example my input date format will be current date 01/03/2023. How Bot will know which date format it is because 01 and 03 month number are available right.