On Tue, Jan 11, 2005 at 12:03:16AM -0600, mstory@xxxxxxxxxxxx wrote: > > I need to know the day of the week for a schedule rotation algorithm > i'm working on. Others have already replied to this part. > I've switched the datestyle format in the .conf file and used the > set to command, but my output never reads as the example in the > 7.4.6 docs it always shows just the dmy standard output 10-12-1999 > for example as opposed to wed oct 17 1987, any help on this would > be appreciated Apparently the 'Postgres' output format acts differently depending on whether the value is a date or a timestamp: SET datestyle TO 'Postgres, DMY'; SELECT current_date; date ------------ 11-01-2005 (1 row) SELECT current_timestamp; timestamptz ------------------------------------- Tue 11 Jan 01:30:32.617394 2005 MST (1 row) The 'Postgres' output format also doesn't appear to support 'YMD', always putting the year last: SET datestyle TO 'Postgres, YMD'; SELECT current_date; date ------------ 01-11-2005 (1 row) SELECT current_timestamp; timestamptz ----------------------------------- Tue Jan 11 01:31:25.6092 2005 MST (1 row) -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html