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

Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.
SOLVED

Date Format in Server

Madihah_29
7 - Meteor

Hi guys,
Does anyone know how to change the format from mm/dd/yyyy to dd/mm/yyyy for the filter using analytic apps date in Alteryx Gallery?

Picture1.png

2 REPLIES 2
Spicionly
5 - Atom

To convert the date format from MM/DD/YYYY to a date format in Alteryx, you can use the "DateTimeParse" function. Here are the steps: Drag and drop a "DateTimeParse" tool onto your workflow canvas. Connect the tool to your data source.

 

BallSportsGear

 

 

danilang
19 - Altair
19 - Altair

Hi @Madihah_29 

 

The answer is you can't unless you want to risk breaking the ui.  The code that returns the formatted date is this

getFormattedDate = function (date) {
    if (!(date instanceof Date)) {
        throw new TypeError("The date must be an instance of Date.");
    }

    return [(date.getMonth() + 1), "/",
            (date.getDate()), "/",
            (date.getFullYear())].join("");
};

 

Dan