Hi All,
I tried to convert the date data type from "V-string" to "Date" in select tool, but failed. sample below.
Date Data Type: V-String
Date Data Type: Date
Seeking your kind help to fix it to do the data type switching. Thank you
Solved! Go to Solution.
Hi @k3pineapple a date in Alteryx can only be YYYY-MM-DD format you will need to use the Date time tool or a formula to parse your dates into that format for it to be a date format. Using Datetimeparse(Your field,"%Y/%m/%d") in a formula tool will work.
@JosephSerpis thx Joseph, my output is required to be such format with "/", is it possible?
Hi @k3pineapple yes any other format other than YYYY-MM-DD will then have to be a string in Alteryx. As I mentioned you need to parse your date into a YYYY-MM-DD format if you want to utlise any datetime functionality within Alteryx. Then you would need to use a the datetime tool or a formula called datetimeformat to get your date into the desired format such as having YYYY/MM/DD .
Hi, @k3pineapple
1- If you want to output field type as date, then you can only get date format as 'YYYY-mm-dd' like '2023-06-02'
DateTimeParse([_CurrentField_], '%Y/%m/%d')
2- If you want to output field format as 'YYYY/mm/dd', then you can only get field type as '*String' like '2023/06/02'
@JosephSerpis thx, seems like, im a little over-think here, if data type is date, YYYY-MM-DD in alteryx will auto converted to YYYY/MM/DD in excel