I'm new using postgresql and had difficult to convert datetime to bigint type. So my tables has column timecreated that datatype is bigint. I want to get value with range datetime format like dd/mm/yyyy example : select * from mytables where timecreated_at between '01/09/2021' and '10/09/2021' . How i can achieved this?
Postgresql – How to get value from range datetime from date format to bigint in postgresql
postgresql
Related Question
- Postgresql – Sum Interval of Dates within same column
- Postgresql – Get all rows from table where JSON column contains a certain value
- Postgresql – How to get a SQL value literal for arbitrary type in PostgreSQL
- PostgreSQL sort by max date and get the difference
- Postgresql – Get base table from materialized view in postgresql
- Postgresql – How to select “array”-type columns via the DBLINK function
- Postgresql – How to query time series with gaps between a given date range in PostgreSQL
Best Answer
You do not convert datetime to
bigint
, you usetimestamp with time zone
. To convert a string to atimestamp with time zone
, use theto_timestamp
function.