Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

How to change format date

MaTT_P
6 - Meteoroid

Hi, in the below formula I would like to change  format date marked in yellow in below screenshot from 2021-04-05 to 04.05.2021 (MM.DD.YYYY) or 04.05.21 (MM.DD.YY)

ChangeFormatDate1.PNG

6 REPLIES 6
AngelosPachis
16 - Nebula

Hi @MaTT_P ,

 

You can use a formula tool and the Datetimeformat function to convert today's date to the desired format

 

The syntax you should use is the following 

 

DateTimeFormat([Today],"%m.%d.%Y")

 

AngelosPachis_0-1617609399812.png

 

You can find more info about the datetime functions in the following link

 

https://help.alteryx.com/current/designer/datetime-functions

 

One thing to note is that your [Converted] field, will now be of a String data type, so you won't be able to make any date calcs using that field.

 

A second way that would give you the same result is the Datetime tool, which is configured slightly differently

 

AngelosPachis_1-1617609592466.png

 

Hope that helps,

 

Angelos

 

Qiu
21 - Polaris
21 - Polaris

@MaTT_P 
We can use DateTimeFormat function

Capture5.PNG

Qiu
21 - Polaris
21 - Polaris

@AngelosPachis 
very nice and detailed explained.👍

AngelosPachis
16 - Nebula

Thanks @Qiu 😀

MaTT_P
6 - Meteoroid

Hi, thank you for explenation, I would like to use this to replace below date from below screen marked on yellow. As i understand from above i cant use this,  Are you able to help me solve this issue?

ChangeFormatDate2.PNG

danilang
19 - Altair
19 - Altair

Hi @MaTT_P 

 

Replace the yellow [Date] from your formula with @AngelosPachis' formula so it becomes

 

...+ DateTimeFormat([Today],"%m.%d.%Y") + ".xlsx"+"|||...

 

Dan 

Labels
Top Solution Authors