On Wed, Mar 14, 2001 at 01:23:30PM -0500, Roland Roberts wrote:
> >>>>> "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

 Yes, an Oracle-compatiblity is important for masks (format pictures)
used in both (Ora and PG). But our PG's implementation has some extensions,
for example 'ID' ISO-day-of-week in 7.2 where Monday = first day of week.
I hope all countries will glad :-)


 for 'WW' and 'D' are results same:

Ora:

SVRMGR> select to_char( to_date('2001/03/12', 'YYYY/MM/DD'), 'WW Day D
YYYY/MM/DD') from dual;
TO_CHAR(TO_DATE('2001/03/
-------------------------
11 Monday    2 2001/03/12
1 row selected.

PG:

select to_char( to_date('2001/03/12', 'YYYY/MM/DD'), 'WW Day D YYYY/MM/DD');
          to_char
---------------------------
 11 Monday    2 2001/03/12
(1 row)

                Karel

-- 
 Karel Zak  <[EMAIL PROTECTED]>
 http://home.zf.jcu.cz/~zakkr/
 
 C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz

PGP signature


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to