How to format dates from editor?

Hi there.

First thing first : good job ! metabase is a great tool ! Really :wink:

Using metabase editor, is this possible to format date value ?

From DATA with two dates columns. I want to keep only the data where the month is identical for both columns.
something like : date_format(columnA, "%Y-%m") = date_format(columnB, "%Y-%m");

I could not create custom column to display date_format(columnA, "%Y-%m").
I could not create filter based on date_format.

Do you have any clue?

Note: i'm using MySQL datasource.


Hi @armetiz
There's no manipulation functions for dates in the Custom Expressions.
But since databases stores dates in a computer format, then you can using substring:
substring([date_column], 1, 7)

Hi @flamber,

Thank you for the answer, this is not UX friendly, but this is working like a charm :wink: