>>>>> "AZ" == Zeugswetter Andreas SB <[EMAIL PROTECTED]> writes:

    >> Unix day-of-week starts on Sunday, not Monday, which is what
    >> date_trunc('dow',...) returns. Presumably this is modeled on
    >> the traditional notion (at least in the US; I suspect this is
    >> true in most European countries at least) of Sunday being "the
    >> first day of week".

    AZ> Germany and Austria have Monday as first day of week, I think
    AZ> most of Europe also.

I believe the goal was to have a to_char() that was complete and
Oracle-compatible.  Perhaps we need to also have a trunc() which is
Oracle compatible.  I haven't been playing with 7.1beta, but 7.0
trunc() doesn't like timestamps.  In Oracle, I can say

    select trunc(sysdate) - trunc(sysdate,'ww') + 1 from dual;

to get Monday=1.

roland
-- 
                       PGP Key ID: 66 BC 3B CD
Roland B. Roberts, PhD                             RL Enterprises
[EMAIL PROTECTED]                     76-15 113th Street, Apt 3B
[EMAIL PROTECTED]                          Forest Hills, NY 11375

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl

Reply via email to