This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I'm a newbie and looking to convert ther records in a date field where the date is expressed in the format of '01-Jan-19' into the alteryx date format (yyyy-mm-dd). I have read through and tried a number of suggestions within this section and I still get the same error when using the DateTime parse tool. I have set the input data type to String and I have specified the incoming string field in a Custom format using different parameters including dd-Mon.-yy yet I always get the same error:
Would anyone have an idea what is going wrong? Once successfully converted I'd like to assign a new column called quarter based on the dates.
Also is it better to use a syntax or the parse tool for converting dates to datetime?
Thanks for the help and suggestion. An error came back first to say that the formula resulted in a string but the output field was set to numeric so i changed the output field to string and it was perfect then.
What is the default input and output date type for the datetime formula? Would the formula work with any kind of input data type or does it only work for string to be converted to string?
The input data type has to be a string (or to be converted to a string using ToString function), the output data type is always Date, DateTime or Time. If you need a different output data type, you can use DateTimeFormat([DateField], 'Format') , (Format is the specification) returning a string.