community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx Knowledge Base

Definitive answers from Designer experts.

Tool Mastery | DateTime

Alteryx
Alteryx
DateTime.png

 This article is part of the Tool Mastery Series, a compilation of Knowledge Base contributions to introduce diverse working examples for Designer Tools. Here we’ll delve into uses of the DateTime Tool on our way to mastering the Alteryx Designer:

 

If you're using the DateTime Tool in v11.0+, be sure to familiarize yourself with the tool's redesign!

 

Date/Time data can appear in your data in string formats (text fields) or date formats. The DateTime Tool standardizes and formats such data so that it can be used in expressions and functions from the Formula or Filter Tools (e.g. calculating the number of days that have elapsed since a start date). It can also be used to convert dates in datetime format to strings to use for reporting purposes.

 

The functionality of the DateTime tool is very similar to the DateTimeParse and DateTimeFormat functions in the Formula Tool, but a little more user-friendly.  

 

To change a date datatype to a formatted string field, all you do is select the date field to be formatted, what you would like the formatted date to look like and the name of the new field Alteryx will create:

 

12-13-2016 2-47-41 PM.png

 

Converting a date contained in a text field to a proper date format works similarly: you select the field to be formatted, the string that matches the current format and what the output field should be called.

 

1-4-2017 2-16-05 PM.png

 

A date stored as date format will always appear as yyyy-mm-dd when viewed in a Browse Tool

 

The dy., Month dd, yyyy and day, dd Month, yyyy options allow you to output the day of the week. This is especially useful if you want to differentiate between weekends and weekdays, e.g. if you want to remove business days from your data (if you only have start and end dates and want to remove business days, refer to this article). 

  

If the DateTime tool doesn't cover your needs, go over to this article and this post to explore the options using Date/Time functions in the Formula Tool. 

 

 By now, you should have expert-level proficiency with the DateTime Tool! If you can think of a use case we left out, feel free to use the comments section below! Consider yourself a Tool Master already? Let us know at community@alteryx.com if you’d like your creative tool uses to be featured in the Tool Mastery Series.

 

Stay tuned with our latest posts every Tool Tuesday by following Alteryx on Twitter! If you want to master all the Designer tools, consider subscribing for email notifications.

Comments
Meteoroid

The DateTimeParse link above gives this error: 

<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>25B496E3A17A0ED5</RequestId>
<HostId>
o7oGfd/HtL5jt/y4MVZGbpqSvLOj2eykTTy1JvBasrXuhSao+PTHy6P/POlKqpNo4I6YKStTh/c=
</HostId>
</Error>
Meteoroid

So does the DateTimeFormat link: 

<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>25B496E3A17A0ED5</RequestId>
<HostId>
o7oGfd/HtL5jt/y4MVZGbpqSvLOj2eykTTy1JvBasrXuhSao+PTHy6P/POlKqpNo4I6YKStTh/c=
</HostId>
</Error>
Alteryx
Alteryx

@Schmid-E

The links have been fixed, thank you for bringing this to our attention! 

Meteoroid

You're welcome!