Hi, need advice about date formats and converting 🙂
I have built document automation model, invoice processing with our company requirements
Our default date format is yyyy-MM-dd or yyyy.MM.dd or sometimes yyyy- month name - dd, this is our normal Lithuanian date format. I have made replacing script in automate flow to change words to numbers, and mostly it works fine. But sometimes i get invoices with different dates format - like dd.mm.yy or similar - it can be invoice from other country, someone using some software with wrong locale set or just software does not support locales, etc 🙂 Do You have any experience on changing dates to correct? As now this is my biggest issue, because without correct dates i cant import invoice data to SQL 😞
You should post process the extracted data with Power Automate's function "parseDataTime"
parseDateTime('2023-01-25')
parseDateTime('2023.01.25')
parseDateTime('2023-january-25')
Yeah, have You tried it when month name is not English word? 😄
I got an idea but do not find how to: cheking if date is valid. It should work something like this:
- If ParseDateTime(AIreadValue) is correct date format then use it - i do not see any function to check if it is correct. I'm thinking now just to spilt into blocks and make another run after fail?
- else - my script to change Lithuanian month names to numbers, etc - this works now already