I want to convert a string to date with a format like (MM/dd/yyyy) so I used DateTime.ParseExact method as mentioned below.
But just now I realized that the source (invoiceDate) format is dynamic. Sometimes it can be MM/dd/yyyy or dd MMM yyyy or dd-MM-yyyy etc.
is there any way to convert it to MM/dd/yyyy regardless of the source (invoiceDate) format?
You can try with as below
Hope this may help you
@MartianxSpace - Please check this post…
Yet, it was so simple but I got confused .
Here is the solution, it converts the date to (System format) MM/dd/yyyy format
I don’t need the date format here because I want the bot to take the system date format
thank you @Srini84 @prasath17