Subject | Finding out dates from set of timestamp |
---|---|
Author | Harriv |
Post date | 2009-03-17T13:27:33Z |
Hi,
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.
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.