Board index » delphi » month

month

hi,

how can i make query something like this

select * from some_table where month(input_date)=january

(to get data by month)

TIA,
Ales

 

Re:month


Use:

SELECT *
FROM some_table
WHERE EXTRACT(MONTH FROM input_date) = 1

"Ales Hotko" <ales.ho...@uni-mb.si> schreef in bericht
news:3A81B2F7.9CC2C1E1@uni-mb.si...

Quote
> hi,

> how can i make query something like this

> select * from some_table where month(input_date)=january

> (to get data by month)

> TIA,
> Ales

Re:month


Ales,

It is the same as what you already have but replace the month wording with
corresponding number.  IE. january = 1, february = 2, etc.

I hope this helps,
Andy

Quote
Ales Hotko <ales.ho...@uni-mb.si> wrote in message

news:3A81B2F7.9CC2C1E1@uni-mb.si...
Quote
> hi,

> how can i make query something like this

> select * from some_table where month(input_date)=january

> (to get data by month)

> TIA,
> Ales

Other Threads