Re: [SQL] Problem with Day of Week

2001-02-06 Thread keith
Always- I think I'll use the to_char since I think you all are saying that that is ISO or at least POSIX. On Mon, 5 Feb 2001, Karel Zak wrote: > > On Mon, 5 Feb 2001 [EMAIL PROTECTED] wrote: > > > Ok, so there is actually two standards then. Is this documented > > anywhere? Is this is someth

Re: [SQL] Problem with Day of Week

2001-02-06 Thread keith
Ok, so there is actually two standards then. Is this documented anywhere? Is this is something that is going to change? I don't want to write and app and have things "break" during and upgrade :) Thanks for the response. On Mon, 5 Feb 2001, Karel Zak wrote: > > On Mon, 29 Jan 2001, Keith Pe

Re: [SQL] Problem with Day of Week

2001-02-05 Thread Karel Zak
On Mon, 5 Feb 2001 [EMAIL PROTECTED] wrote: > Ok, so there is actually two standards then. Is this documented > anywhere? Is this is something that is going to change? I don't want > to write and app and have things "break" during and upgrade :) I mean you can be caseful. Not changes planne

Re: [SQL] Problem with Day of Week

2001-02-05 Thread Karel Zak
On Mon, 5 Feb 2001, Ross J. Reedstrom wrote: > On Mon, Feb 05, 2001 at 05:15:47PM +0100, Karel Zak wrote: > > > > test=# select date_part('dow','2001-02-11'::timestamp); > > date_part > > --- > > 0 > > > > test=# select to_char('2001-02-11'::timestamp, 'D'); > > to_char > >

Re: [SQL] Problem with Day of Week

2001-02-05 Thread Ross J. Reedstrom
On Mon, Feb 05, 2001 at 05:15:47PM +0100, Karel Zak wrote: > > test=# select date_part('dow','2001-02-11'::timestamp); > date_part > --- > 0 > > test=# select to_char('2001-02-11'::timestamp, 'D'); > to_char > - > 1 > > > date_part is based on zero - use range 0-

Re: [SQL] Problem with Day of Week

2001-02-05 Thread Brian C. Doyle
Keith, Try: select to_char('now'::timestamp,'Dy'); to_char - Mon (1 row) -- DAY = full upper case day name (9 chars) Day = full mixed case day name (9 chars) day = full lower case day name (9 chars) DY = abbreviated upper case

Re: [SQL] Problem with Day of Week

2001-02-05 Thread Karel Zak
On Mon, 29 Jan 2001, Keith Perry wrote: > Greetings, > > I notice some talk about date problems and interestingly enough planning > out an application in which I will need to be able to manipulate dates. > I notice however that there seems to be a discrepancy with the day or > week in 7.0.3 >

[SQL] Problem with Day of Week

2001-02-05 Thread Keith Perry
Greetings, I notice some talk about date problems and interestingly enough planning out an application in which I will need to be able to manipulate dates. I notice however that there seems to be a discrepancy with the day or week in 7.0.3 --- pmhcc=# select date_part('dow','now'::timestamp);