Re: date_trunct() and start of week

From: Thomas Markus <t(dot)markus(at)proventis(dot)net>
To: Thomas Kellerer <spam_eater(at)gmx(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: date_trunct() and start of week
Date: 2009-11-27 08:41:15
Message-ID: 4B0F90AB.1050506@proventis.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

not all to zero : "that are less significant than the selected one set
to zero (or one, for day and month)"

so

select extract('dow' from date_trunc('week', current_date))

returns always 1 (i think accordingly to ISO-8601)

see
http://www.postgresql.org/docs/8.1/static/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT
dow:
"The day of the week (0 - 6; Sunday is 0)"

regards
Thomas

Thomas Kellerer schrieb:
>
> Hmm, I don't see that in there.
> It just states that the field will be set to "zero". But does zero
> refer to a Monday or a Sunday?
> Regards
> Thomas
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Maclean 2009-11-27 08:48:47 Is there any reason why databases cannot have a binary formatted datatype?
Previous Message bbhe 2009-11-27 08:33:25 return value for PQbinaryTuples