Re: date manipulation - Mailing list pgsql-sql

From Josh Berkus
Subject Re: date manipulation
Date
Msg-id web-846741@davinci.ethosmedia.com
Whole thread Raw
In response to date manipulation  ("Travis Hoyt" <thoyt@npc.net>)
List pgsql-sql
Travis,

> Curious to know if there's an easy way to do what I'm trying to do.
>   As of
> yet I haven't been able to find any documentation or examples that
>  help.
> I basically want to be able to figure how how many 1st's and 15th's
>  there
> are between date X and Y.  Is there a simple solution?

Please see the Time/Date/Interval FAQ:
http://techdocs.postgresql.org/techdocs/faqdatesintervals.php
and the documentation:
http://www.postgresql.org/idocs/index.php?datatype-datetime.html

Finally, Joe Celko's book "SQL For Smarties" has a question andsolution very similar to what you ask above.

-Josh Berkus



pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: Named column in a Function fails at ORDER BY (PgSQL 7.1)
Next
From: "Josh Berkus"
Date:
Subject: Re: Cleaning up template 1 -> template0 cloning