[SOLVED] Date format

I need a date in this format " DD/MM/YYY "( not using native query).
Now date in string format “Friday, January 26, 2018 7:38 AM” So I couldn’t sort properly.

Can you help me?

1 Like

Hi, @lechu,

Build the question in builder and convert to sql then append

Date_format(@date, “%d/%m/%Y”)

1 Like

The next version of Metabase, 0.31, will also include lots of new options for formatting dates, numbers, and currencies without having to use SQL.


Yay :slight_smile:

Double yay :slightly_smiling_face: :slightly_smiling_face:

When is the next version releasing?

Hi Siddarth

I am not sure what you mean by ‘then append’.

I have the same date issue. The date field is simply labelled ‘date’.

Would I therefore write ‘Date_format(date, “%d/%m/%Y”)’ in the select function, or do I put the decorated statement ‘Date_format(@date, “%d/%m/%Y”)’ somewhere else?

I have tried both, but with no luck.

Thanks! Andrew

1 Like

Hey Andrew,

Which Sql are you using.


Could you try with this syntax

SELECT TO_CHAR(NOW() :: DATE, ‘dd/mm/yyyy’);

The one i mentioned earlier was for Mysql.

Thank you!

Hi Siddarth,

Could we change date picker, Because the default date picker is like this below image, but i want customize date picker, Could I customize this date picker.

@Dibyaranjan If you want to customize the date picker, then you need to change the frontend code.
You should start a new topic, since it’s completely unrelated to this topic.

I need to sort by date and also compare by date. My dates are
August 21, 2018, 10:57 PM. I don’t care about the time but I want to see what records have XX-Date > ‘12/01/2015’

I’m not sure how to fit the above masks into this.