difference in extract and to_char - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject difference in extract and to_char
Date
Msg-id 3F8B9204.3030904@familyhealth.com.au
Whole thread Raw
List pgsql-hackers
I just noticed this fairly silly behaviour:

test=# select to_char(current_date, 'D'), extract(dow from current_date); to_char | date_part
---------+----------- 3       |         2
(1 row)


I guess we can't change that now, but they really should number their 
days from the same base...

Chris




pgsql-hackers by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: comments on casts
Next
From: Tom Lane
Date:
Subject: Re: comments on casts