Create Question with Custom Query and Date + Time Filtering

Hi,

I am using the latest version ( metabase : 0.24.1 ) with Postgresql 9.6.2 in Windows 8.1. Because I have a lot of data in a single day I want to allow the user to filter not only with date but also by time. There is no such an option with optional filters (that is metabase has only date filtering) and a workaround I found is to add another filter that allow the user to input how many hours from midnight he wants to go (e.g. 0-24 hours). But I have a problem when I try to add the hour offset to timestamp field that is coming from DB. For example into a select statement there is a condition like :

                             Start (time-stamp from DB ) + {{hour_offset user input}} < {{user date input}}  
                                      -- DB Field--               +      -- User Field --          <   -- User Field --

Is there any solution ?

Yeah, you’re correct that unfortunately filtering on time of day is possible with GUI question filters but not yet with SQL or dashboard filters.

I can’t help you with your specific workaround, but one of our more technically adroit users might be able to.

At least can I add into a query 2 optional fields like :

Select ......
From ....
Where true
[[ AND table.column > {{user_field1}} + {{user_field2}} ]]

or there is a way to do such an addition?