how to select a time frame on timestamp rows.

From: bartschm(at)psi(dot)com
To: Postgres SQL list <pgsql-sql(at)postgresql(dot)org>
Subject: how to select a time frame on timestamp rows.
Date: 2001-01-14 00:24:08
Message-ID: 3A60F1A8.794AAE3B@psi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello,
today i was trying to perform a query on a database using a time stamp
field, i need to get all records which belong to year 2000, month 11,
is there any other way to doit, or is this the pgsql way? , actually
i'm using a query like this:
select User_Name from tbacct where acct_timestamp like '2000-11%' group
by User_Name;

on MySQL i use this

select User_Name from tbAcct where month (Acct_Timestamp) = 11 group by
User_Name;
(on mysql i was't worried about year yet)

is anything like the month function from mysql on pg-sql? sorry if the
question
is to obvious, but i was reading the docs and can't find an answer.

Regards!

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Peter Eisentraut 2001-01-14 01:10:18 Re: how to select a time frame on timestamp rows.
Previous Message Najm Hashmi 2001-01-13 17:59:09 pl/pgsql Limits