Trouble with DateTime Tool
- 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,
I have a Date field that I need to convert to a short date as it is not flowing throughout the workflow.
The date appears as shown below: MM/dd/YYYY hh:mm:ss in the APH REQ Action date field.
I am using the DateTime tool:
My new field is all NULLS
Not sure I know why.
Thanks,
Adam
Solved! Go to Solution.
- Labels:
- Best Practices
- Datasets
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
My results come through with this alteration. :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Check this post out for converting AM/PM to correct hours, as the conversion above doesnt account for that difference.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@DanielG That worked, but I want to the Output field to be MM/dd/YYYY without the time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Alteryx date fields are YYYY-MM-DD so when you use the Date/Time tool that will be your output. You can just drop the time with a following select tool where you change Data Type from DateTime to just Date. 😀
If you just want to cut the time off but leave it as a string, then use text to columns as such...
and drop the 2nd column by deselecting it with a select tool.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Because Alteryx uses YYYY-MM-DD as their standard date structure. So when the DateTime Tool asks for your input string format it knows where to find the bits and pieces of the data to construct an actual date/time field for you. You can do it with a bunch of formulas, but it is much easier to use the DateTime Tool. Otherwise your date field is just a string that Alteryx would be able to perform date calculations on.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
