I am trying to convert dates of the format Jan 1, 2011 via the date time tool
However it is not working. Any reason as to why? It only gives Nulls.
Hi @Inactive User,
In the DateTime tool, you should give the format of the incoming data which in your case is "Mon dd,yyyy" . I see that in your configuration you have given something else.
Once you have given the format of incoming data which matches with your data the DateTime tool will convert it into Alteryx Date Format which is "yyyy-mm-dd" and thus the output would be 2011-01-01. you can also get the output in the format 01-01-2011 but that won't be a Date field but string field as alteryx only accepts "yyyy-mm-dd" as the date field.
I hope it helps.
Hi @Inactive User
When using the DateTime tool, you need to either select an existing configuration, or create one yourself. In your case, there is a default configuration that matches your input. Try and select the marked format in your workflow, and believe it should work.
@Inactive User I think it should be something like this.
Why won't the one I have work? I am wondering why my configuration is failing? Thanks
What if I want the output to be 01-01-2011?
The issue is you need to give input date format (Mon dd,yyyy) the format you are giving it yyyy-MM-dd hence its giving null
Try below config
Hope this helps 🙂
@Inactive User,
in the date convert you have to choose the input format not the output.
So the format will be mon dd, yyyy.
The output default date format for convert date is yyyy-MM-dd.
Hope that helps,
Best Regards,
So with a RegEx, we always have to use custom, if I understand correctly?