How to convert DD-Mon-YYYY(string format) to DD-Mon-YYYY(string format) in date format
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
How to convert DD-Mon-YYYY(string format) to DD-Mon-YYYY(string format) in date format
I am using data from Postgre DB where I have Date format: 2020-01-21 and I am expecting the output 21-Jan-2020 as a Date data type in alteryx.
I have tried the approach from the below link but I am getting Null as output.
Error Message
ConvError: Formula (49): DATETIMEPARSE: Cannot convert "08-Dec-2019" to a date/time with format "%Y-%m-%d": Expected a number for Month: 'Dec-2019'
Output :
Can anyone help to resolve this asap?
Solved! Go to Solution.
- Labels:
- Date Time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @jyotibarai Alteryx can only accept the format of a date as YYYY-MM-DD so that is why your output formula is not working. As I can see from your screenshot you have already formatted as DD-Mon-YYYY as a string field that is the only way Alteryx would be able to handle that date in that format being recognized as a string field. If you need to perform any additional data time functions you would need to use the Visit column as that in the format Alteryx recognizes as a date format.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello @jyotibarai,
Are you looking for this? "DateTimeFormat([Field1],'%d-%b-%Y')"
This dates can only be format as String. To have them output as date they have always to be in yyyy-mm-dd format.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
