From: Michael Burke <michael@engtech.ca>
To: pgsql-sql@postgresql.org
To: aarni@kymi.com
Subject: Re: Querying date_time for date only ?
Date: Tue, 20 Dec 2005 09:19:49 -0400
Message-ID: <200512200919.49986.michael@engtech.ca> (raw)
In-Reply-To: <200512201459.07358.aarni@kymi.com>
References: <200512201459.07358.aarni@kymi.com>
On December 20, 2005 08:59 am, Aarni Ruuhimäki wrote:
> Hello List,
>
> I have a time stamp without time zone field, YYYY-MM-DD hh:mm:ss, in my
> table. I want to also find something just for a particular day regardless
> of the time.
>
> (Pg)SQL way to do this ?
You can try,
SELECT field::date FROM mytable;
to select only the date part. Likewise, you can use field::time if you want
to disregard the date.
> TIA,
>
> Aarni
HTH.
Mike.
--
Michael Burke
michael@engtech.ca
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: michael@engtech.ca, aarni@kymi.com
Subject: Re: Querying date_time for date only ?
In-Reply-To: <200512200919.49986.michael@engtech.ca>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox