Hi all,
my PVA is speaking in Italian and during conversation it read a date using "Date and Time" entity. The value is stored in Italian Culture format (dd/mm/yyyy hh:mm:ss), I checked it printing the variable in a message. For example "today" is converted in 08/04/2021 00:00:00.
Then the variable is passed to an action that expect the input as a string.
Checking the Flow I noticed that the date is converted not in Italian format but in mm/dd/yyyy hh:mm:ss even if the settings of Power Automate locale is Italian.
The Flow is currently adjusting the format to Italian using a workaround but I prefer to avoid this if possible.
Why does it happen? Did I miss any configuration?
Thanks,
Andrea
Hi @renatoromao and @Jcook,
thank you for your suggestions. I already converted the datetime in Italian format into the Flow and it is working. I wanted to understand if it was the only way to have the correct format.
During tests I noticed another point: if I respond to the bot for example with "Monday 12 April 2021 09:00" the Flow will receive date as "04/12/2021 09:00" as we discussed above. But if I respond "April 12" the bot shows me two options 12/04/2020 and 12/04/2021. By selecting one of these the Flow will receive "12/04/2021" or "12/04/2020" so the date without time and not in the default format.
It is correct?
Thanks,
Andrea
Hello @AndreaMac82
I have a blog post on easily converting and formatting date in Power Automate:
Converting Time Zones Easily In Power Automate – Flow Alt Delete – Josh Cook [Microsoft MVP]
Hi @AndreaMac82 ,
Internally, the default date time format is mm/dd/yyyy and I think that your chatbot is showing in Italian format because it's just a mask following your bot language and not the real value.
I recommend you to convert inside your workflow: Working with Dates and Times inside of your flows | Power Automate Blog (microsoft.com)