Extract time component

May I know if I can get the time component in a timestamp.

Data: August 31, 2020, 9:30 AM
I want to get ‘9:30 AM’.
And also if there’s a way to get what day of the week the date is?

Thanks!

RJ

Hi @rj.estera
It’s currently not possible to what you’re looking for in the UI. It would depend on multiple issues being fixed.
You would have to create another question or database view, which returns what you’re looking for.

Thanks Flamber. I tried using SQL substring but it did not work. Do you know of some other way to do this?
RJ

@rj.estera I don’t know which database you’re are querying, but doing time(column_name) would probably do what you’re after.

@flamber, tried using time but i'm encountering an error.
image

error:

@rj.estera
Post “Diagnostic Info” from Admin > Troubleshooting, and the database you are querying.
You could also try cast(column_name AS time)
But I would recommend that you use a forum dedicated to your database, since you will find better help there - perhaps stackoverflow.com - and how to write queries is not specific to Metabase.