I have dates stored in timestamp of the form:
1999-01-08 04:05:06
1999-01-24 13:22:29
What I want is to make a query between ranges of dates that is:
Inicio: 1999-01-09
Fin: 1999-01-12
It returns the records with a date between 1999-01-09 and 1999-01-11 that is, it does not take into account the days of the end date, ie I get:
1999-01-09
1999-01-10
1999-01-11
But I also have
1999-01-12
So what I'm looking for is to get
1999-01-09
1999-01-10
1999-01-11
1999-01-12
the query I have is
select * from ingreso
where fecha_hora between '1999-01-09' and '1999-01-12'
How could I get the expected results?