Date Time Formation
- 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
Hello everybody,
i have a strange data format for dates, it is looking like this 10-JAN-20 but of cause this dosent work with Alteryx DateTimeDiff(dt1,dt2,u) function.
Would be really nice if someone could help me to transform this into somethink that work.
Thanks a lot
Timo
Solved! Go to Solution.
- Labels:
- Date Time
- Transformation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Timo97
Here is how you can do it.
Formula:
DateTimeDiff(
DateTimeParse([Date 2],"%d-%b-%y"),
DateTimeParse([Date 1],"%d-%b-%y"),
"days")
Workflow:
Hope this helps : )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
To add to @atcodedog05 's great solution, I suggest saving the below page. It's a good reference for the different syntax and specifiers used in date time functions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks a lot @atcodedog05 and @Luke_C for this massive help.
Now there is another problem that my data language is different then my Alteryx language can i change this just for this function ?
probably not i guess...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Timo97
Date format is only changing within the formula. Its not changing the actual data itself your actual data will stay the same.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
What i mean@atcodedog05 is that my data language is different than english so the function does not recognise the Months...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Timo97
If i understand correctly if you are saying your month naming convention is different then it wont work. You would need to use find and replace to replace other language month name to English month name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
That is exactly what i mean
Thanks you very much @atcodedog05 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Happy to help : ) @Timo97
If my response helps please don't forget to mark it as solution.
Cheers and have a nice day!
