Custom Expression - "Today's Date"

I reviewed the Metabase "custom expression" documentation and could not find a solution which makes me think there isn’t one but I thought the group might be able to confirm or advise if I have overlooked something.

I am looking for a solution using custom expression to register today’s date (e.g. "NOW()" or DATE or GETDATE or TODAY, etc.). This is similar to specifying NOW() in excel. Is there a command, function, or formula exists that is supported by custom expressions in Metabase?

Thanks again, any insight is appreciated.

Hi @TampaPilot
Currently no, but there's work being done to add it in upcoming versions: - upvote by clicking :+1: on the first post

1 Like

Hi @flamber,

is that feature part of the rollout * Easy date comparisons Simplified comparisons over different timeframes ?

Same problem: I am naive to SQL, so would like to use a custom expression that uses a today or similar function. I would like to compare this years value (e.g. value from 2022-11-10) compared to last years value (vs. 2021-11-10), but can only do so if I state a between function with exact time frames. Makes it static, but need a dynamic solution :frowning:

@germanprinter Sounds like you are looking for, which will become even easier in future versions.

Or perhaps it's just How to set date range for comparing this year and last year (to date)