date_trunct() and start of week

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: date_trunct() and start of week
Date: 2009-11-26 21:59:05
Message-ID: hemtn6$drb$1@ger.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

while using date_trunc('week', some_date) to get the date of the first day of the week I noticed that it was working as expected: Monday is considered the start of the week.

I assume this depends on some locale setting, but I can't figure out which it is, so I can make sure this is not "accidently" changed. I tried changing LC_TIME (American_America) but that still returned Monday as the first day (my understanding is that in the States Sunday is considered the start of the week)

Any pointers are appreciated (did I miss it in the manual?)

Regards
Thomas

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2009-11-26 22:15:09 Re: date_trunct() and start of week
Previous Message Bill Todd 2009-11-26 19:02:27 Re: How use input parameter as path to COPY in function?