Search Postgresql Archives

to_timestamp() and quarters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

I can't seem to get to_timestamp() or to_date() to work with quarters, can anyone see what I'm doing wrong?

e.g.
	select to_date('2010-1', 'YYYY-Q');
	Gives "2010-01-01" (correct).

	select to_date('2010-3', 'YYYY-Q');
	Also gives "2010-01-01" (should be 2010-07-01);

Am I misunderstanding how this function works? EXTRACT(QUARTER FROM date) works fine.

I'm running Postgresql 8.4.2 on a FreeBSD system.


Thanks,
Asher.

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux