Re: [SQL] parts of date_part()

From: Brook Milligan <brook(at)trillium(dot)NMSU(dot)Edu>
To: ericm(at)palaver(dot)net
Cc: pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [SQL] parts of date_part()
Date: 1998-08-25 17:20:18
Message-ID: 199808251720.LAA05553@trillium.nmsu.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

played with some other things, like 'month' and 'year'. However, I was
wondering if there was a way to obtain the name of the day (Tuesday,
Wednesday, etc.) using this function, among other things. I tried

Try

select date_part ('dow', field_name) from table ;

This gives numbers 0-6 => Sunday-Saturday (I think). I suppose that
could be joined with another table with names.

Is there a more direct way to get the names?

Cheers,
Brook

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Jose David Martinez Cuevas 1998-08-25 18:07:11 Having problems to compile SPI
Previous Message Andreas Schmidt 1998-08-25 15:45:24 Query otimizing possible?