Re: [GENERAL] Generate a list of (days/hours) between two dates

2005-06-28 Thread Ben Hallert
Thanks for the replies! I've adopted the generate_series method, it's absolutely perfect. I didn't have the dates in a table yet, I needed a method to generate them from scratch, and this will do nicely. Thanks again, and hopefully I'll be able to contribute back someday! -

Re: [GENERAL] Generate a list of (days/hours) between two dates

2005-06-28 Thread Hakan Kocaman
f > Gnanavel Shanmugam > Sent: Tuesday, June 28, 2005 7:45 AM > To: [EMAIL PROTECTED]; pgsql-general@postgresql.org > Subject: Re: [GENERAL] Generate a list of (days/hours) > between two dates > > > This might be helpful, > > select current_date + s.t as dates

Re: [GENERAL] Generate a list of (days/hours) between two dates

2005-06-28 Thread Michael Fuhr
On Mon, Jun 27, 2005 at 10:30:38AM -0700, [EMAIL PROTECTED] wrote: > > I'd like to make a query that would return a list of every trunc'd > TIMESTAMPs between two dates. For example, I'd want to get a list of > every date_trunc('hour',whatever) between 6-1-2005 and 6-10-2005 and > get a list that

Re: [GENERAL] Generate a list of (days/hours) between two dates

2005-06-28 Thread Gnanavel Shanmugam
t: 27 Jun 2005 10:30:38 -0700 > To: pgsql-general@postgresql.org > Subject: [GENERAL] Generate a list of (days/hours) between two dates > > Hi guys, > > I've scoured the date/time functions in the docs as well as > google-grouped as many different combinations as I could th

Re: [GENERAL] Generate a list of (days/hours) between two dates

2005-06-27 Thread Gregory Youngblood
Hopefully I'm understanding your question correctly. If so, maybe this will do what you are wanting. First, a couple of questions. Do you have this data in a table already, and are looking to extract information based on the dates? Or, are you basically wanting something like a for loop so

[GENERAL] Generate a list of (days/hours) between two dates

2005-06-27 Thread ben . hallert
Hi guys, I've scoured the date/time functions in the docs as well as google-grouped as many different combinations as I could think of to figure this out without asking, but I'm having no luck. I'd like to make a query that would return a list of every trunc'd TIMESTAMPs between two dates. For e