From: | Manuel Sugawara <masm(at)fciencias(dot)unam(dot)mx> |
---|---|
To: | Michael Hanna <zen(at)hwcn(dot)org> |
Cc: | pgsql-novice <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: query question |
Date: | 2003-07-03 16:01:17 |
Message-ID: | m31xx71twy.fsf@conexa.fciencias.unam.mx |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Michael Hanna <zen(at)hwcn(dot)org> writes:
> I have a table:
>
> michael=# \d healthnotes
> Table "public.healthnotes"
> Column | Type | Modifiers
> --------+--------------------------
> +-------------------------------------------------------------
> posted | timestamp with time zone | not null default
> ('now'::text)::timestamp(6) with time zone
>
> notes | text |
> Indexes: healthnotes_pkey primary key btree (posted)
>
> Often there are multiple entries per day. I want to display the day once,
> with all the entries on that day.
Try casting the timestamp to date,
select * from healthnotes where cast(posted as date) = 'your date here';
Regards,
Manuel.
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2003-07-03 16:31:23 | Re: query question |
Previous Message | Michael Hanna | 2003-07-03 15:33:39 | query question |