Hi PA Community members,
I'm facing an issue with a text to date conversion. I believe it is possibly very common problem, but I have not found a correct solution from any previous posts yet!
In my app, I have customer requests coming in with a date as text, in dd/mm/yyyy format.
I am storing the data in a Collection with the following code:
due_date: Text(DateValue(TextInput_RepDt1.Text), "yyyy-mm-dd")
It is working correctly, unless the day value is more than 12. it then changes the entire date. The screenshot below will help to explain the situation:

The left image is how the data is displayed, and the right image is how the collection stores the date.
This is causing huge problem as I'm storing the above date in a SQL DB table (with a Patch function).
Can anyone please point out what changes I need to make in my formula to convert a date correctly?
Thanks
Ozzie