get time from datetrunc postgres code example
Example: postgresql where datetrunc month and year equal
... WHERE date_trunc('month', b.col) = date_trunc('month', a.col);
... WHERE date_trunc('month', b.col) = date_trunc('month', a.col);