Re: format query

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: enzovenegas(at)mixmail(dot)com
Cc: "pgsql-php(at)postgresql(dot)org" <pgsql-php(at)postgresql(dot)org>
Subject: Re: format query
Date: 2005-03-09 15:16:43
Message-ID: 422F135B.5040600@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

> I am trying to build a query sql that select all rows in my table with a
> spesific month (format timestamp, yyy-mm-dd hh:mm:ss), for example, all of
> january, select * from table where field_date = 01.
> but i don't know the specific query

select * from table where extract(month from field) = 1;

Chris

In response to

  • format query at 2005-03-09 12:22:53 from enzo venegas palacios

Browse pgsql-php by date

  From Date Subject
Next Message Van Ingen, Lane 2005-03-10 21:08:47 Can't Get PHP Going on PostgreSQL
Previous Message Todd Lewis 2005-03-09 15:07:57 Re: format query