Skip site navigation (1) Skip section navigation (2)

Re: Timestamp problems...wrong weeks.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Campano, Troy" <Troy(dot)Campano(at)LibertyMutual(dot)com>
Cc: "Pgsql-General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Timestamp problems...wrong weeks.
Date: 2004-04-29 23:28:39
Message-ID: 18028.1083281319@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-general
"Campano, Troy" <Troy(dot)Campano(at)LibertyMutual(dot)com> writes:
> However the data says that April 28th 2004 was in week 4 of April and
> that April 29th 2004 was in week 5 of april.
> This is incorrect.

This *is* correct according to our published specification for the W
format code:

W	week of month (1-5) (The first week starts on the first day of the month.)

Since you haven't defined what behavior you want, it's hard to suggest
alternatives, but have you looked at the WW and IW format codes?

			regards, tom lane

In response to

pgsql-general by date

Next:From: Tom LaneDate: 2004-04-29 23:41:01
Subject: Re: Unable to use index?
Previous:From: Tom LaneDate: 2004-04-29 23:23:24
Subject: Re: postgresql idle

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group