Thread: date manipulation

date manipulation

From
"Travis Hoyt"
Date:
Hello,

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?

Thanks,

Travis

Re: date manipulation

From
Ewald Geschwinde
Date:
Travis Hoyt wrote:

>Hello,
>
>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?
>
>Thanks,
>
>Travis
>
There is a good DATE/TIME FAQ from josh berkus at
http://techdocs.postgresql.org

Ewald





Re: date manipulation

From
"Josh Berkus"
Date:
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