Date Function
- 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 All,
I have a formula tool which calculates 'DateTimeToday() ' but I want to display the output as DD-MMM-YY.
Any thoughts.
Thanks
Solved! Go to Solution.
- Labels:
- Developer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @micky01 you would need to wrap that function in a datetimeformat function and ensure the data type is a string to get that output. I mocked up an example let me know what you think?
- 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
- 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you Joseph.
Just wondering how to get this format DD-MMM-YY.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @micky01 Alteryx only recognises YYYY-MM-DD e.g. 2021-02-17 as a valid date data format any other format such as DD-MMM-YYYY 17-Feb-2021 has to be a string data format. The rationale is the datatime functions within Alteryx only work with YYYY-MM-DD formats. The function datetimeformat(DateTimeToday(),"%d-%b-%y") will give you a format of DD-MMM-YY lowercasing the y changes the format of the year. The specifiers for datatime functions can be found here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @micky01,
Like @JosephSerpis stated. If you are interested in keeping the format that you have mentioned you need to change the data type to string.
If you will use the formula tool and change the data type to string you will get something like this:
I have used the below formula in order to get this result:
DateTimeFormat(DateTimeToday(),'%d-%b-%y')
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you Joseph for detail explanation.