Subject | Re: [firebird-support] Finding out dates from set of timestamp |
---|---|
Author | Helen Borrie |
Post date | 2009-03-17T13:32:58Z |
At 12:27 AM 18/03/2009, you wrote:
..., ...
group by 1
./hb
>Hi,select cast (field_timestamp as date),
>
> Is there query to do following without going thru all the records in the table:
>
>select extract(YEAR FROM FIELD_TIMESTAMP),
>extract(MONTH FROM FIELD_TIMESTAMP),
>extract(DAY FROM FIELD_TIMESTAMP) from MYTABLE
>group by extract(YEAR FROM FIELD_TIMESTAMP),
>extract(MONTH FROM FIELD_TIMESTAMP),
>extract(DAY FROM FIELD_TIMESTAMP)
>
> So basically I need all the dates in the table, omitting the time
>part of timestamp.
>
> I'm using Firebird 1.5 in this.
..., ...
group by 1
./hb
>------------------------------------
>
>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>Visit http://www.firebirdsql.org and click the Resources item
>on the main (top) menu. Try Knowledgebase and FAQ links !
>
>Also search the knowledgebases at http://www.ibphoenix.com
>
>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>Yahoo! Groups Links
>
>
>