Re: Extract date portion of a datetime field - Mailing list pgsql-novice

From Tom Lane
Subject Re: Extract date portion of a datetime field
Date
Msg-id 28855.1524060244@sss.pgh.pa.us
Whole thread Raw
In response to Extract date portion of a datetime field  (JORGE MALDONADO <jorgemal1960@gmail.com>)
List pgsql-novice
JORGE MALDONADO <jorgemal1960@gmail.com> writes:
> I have a table with a datetime field which saves (of course) date and time
> information. I need to design a query to count the number of records of
> each date without taking into account the time portion. I have seen that I
> can use functions like EXTRACT but I do not find how to extract the whole
> date only.

Cast to date?

            regards, tom lane


pgsql-novice by date:

Previous
From: JORGE MALDONADO
Date:
Subject: Extract date portion of a datetime field
Next
From: Scott Ford
Date:
Subject: Re: Extract date portion of a datetime field