Sort Date and Time
- 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 All,
I have a dataset in which I want to sort date and time associated with it in ascending order.
I have attached a sample dataset to it.
Solved! Go to Solution.
- Labels:
- Date Time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Arnsen I mocked up a workflow let me know what you think?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @Arnsen
If you convert your date into an Alteryx DateTime first using a formula: DateTimeParse([Date Time], "%m/%d/%Y %H:%M")
Then you will be able to sort it using the standard sort tool
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Great !!
Thank You
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Arnsen
the Sort tool (in the Preparation category) should give you what you want. In your sample file the type of your 'Date time' field is DateTime, which is the correct one for the Sort tool to sort the data correctly in this case, but if the type in your workflow is String, you can use the DateTime tool from the Parse category to convert types.
(To check the data type click on the Metadata tab in the Results window).
Hope this helps!
Giuseppe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
