Hi, I am trying to convert Jun 30 2021 which is defined as String to 30/6/2021 (dd/mm/yyyy) and in Date format . Does anyone know how to solve this?
Solved! Go to Solution.
Hi @khadijahneddy ,
Here are two ways you can do it, either by using a single formula tool or two Datetime tools
Hope that helps,
Angelos
Hi @khadijahneddy ,
you can convert the date to a date data type using DateTimeParse([Tx_DT], '%b %d %Y') and convert this to the required format using DateTimeFormat([Dt_DT], '%d/%m/%Y'). The first formula will result in a date data type, the second one will return a string.
Both in one go is also possible:
DateTimeFormat(DateTimeParse([Tx_DT], '%b %d %Y') , '%d/%m/%Y')
Let me know if it works for you.
Best,
Roland
In Alteryx, all field defined as DATE format must use YYYY-MM-DD format. Any other format will be a string field. So you can't have both "30/6/2021 (dd/mm/yyyy) and in Date format". The standard way to deal with this is to use the Alteryx date format within the workflow and convert the fields to string and change the date values to the format you need.
Dan
User | Count |
---|---|
17 | |
15 | |
15 | |
8 | |
5 |