Strange query results with dates

From: Igor Khanjine <igor_kh(at)mailru(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Strange query results with dates
Date: 2000-10-24 03:41:25
Message-ID: 2517954767.20001023164125@mailru.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi!

Help me please to resolve my problem.
I cann't understand why my query returns very strange results.

select datop from mytable where date_trunc('month',datop)
=date_trunc('month',abstime '22.05.00')

it returns a strings with operations which were made in May,

but similar query

select datop from mytable where date_trunc('month',datop)
=date_trunc('month',abstime '02.05.00')

it returns operations which were made in february !

I'm running PGSQL 7.0 ,
SET DATESTYLE ='GERMAN'
SET TIME ZONE 'EUROPE/MOSCOW'

Tell me please , what I made wrong?

Thanks for any suggestions.

Igor.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Glen and Rosanne Eustace 2000-10-24 04:20:37 Re: Stumped on PlPgSql
Previous Message Stephan Szabo 2000-10-24 02:14:59 Re: query statement help