Hi All,
I have a formula tool which calculates 'DateTimeToday() ' but I want to display the output as DD-MMM-YY.
Any thoughts.
Thanks
@micky01
Like this
@micky01,
Please see below:
DateTimeFormat(DateTimeToday(),"%d-%b-%y")
Regards,
Hello @micky01,
You can try this. It will be helpful for you.
Nitish
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.
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')
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?
Hi @micky01
Try to add the "DateTime" Tool in order to display the date in the required form.
Thank you Joseph.
Just wondering how to get this format DD-MMM-YY.