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
Hi there,
I am trying to concert som data into a date-datatype, but for some reason, the conversion changes the format.
It is a excel file that bring in the data as string, and the format of the date is dd.mm.yyyy. When I covert the data into a date-datatype, it changes the order, and returns yyyy-dd-mm.
I used the formula tool with this formula: DateTimeParse([Dat],"%d.%m.%y")
Thanks in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
EDIT : Hi @ohruud - I read your question wrong when I responded a minute ago, I'll check it out and reply if someone else doesn't before I get back to it. Apologies for the false start!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
The DateTime data type in Alteryx will always store the date in the YYYYMMDD format.
If you want it in another format, you can convert it to a string with the DateTimeFormat function, which outputs a String data type.
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Ah, okei. So yyyy-mm-dd is the only format alteryx allows in terms of doing calculations ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
That is correct. It is very common for people to change their date format at the end of a workflow for familiarity in reporting outputs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I see. Thank you so much 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Blake,
I just have one more question
When i used the DateTimeParse formul, the dates came out correctly. However, when i used the datetime tool and custom-fitted the incomming string to be dd.mm.yyyy, the result came out wrong.
I had for example the date 11.12.2000, and it came out as 2000-01-11 00:12:00 instead of 2000-12-11. Dont know why.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
you have to use MM instead of mm.
mm is used for Minutes
MM is used for Months
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
the YYYYMMDD format, is the default format for Alteryx?
