Thread: [Fwd: Day name, month name from a datetime field]

[Fwd: Day name, month name from a datetime field]

From
"Deepa K"
Date:

---------------------------- Original Message ----------------------------
Subject: Day name, month name from a datetime field
From:    "Deepa K" <kdeepa@midascomm.com>
Date:    Tue, January 4, 2005 5:43 pm
To:      pgsql-novice@postgresql.org
--------------------------------------------------------------------------

Hi,
  I have a table which will have two datetime fields (logintime and
logouttime).

logintime : time at which the user is logged in
logouttime : time at which the user is logged out.

Is it possible to get the rows from table where the day is sunday.

And also is it possible to map the days in all rows to day name and
similarly is it possible to map the month in all rows to month name.

--
regards,
Deepa K



--
regards,
Deepa K

Re: [Fwd: Day name, month name from a datetime field]

From
Michael Fuhr
Date:
On Thu, Jan 06, 2005 at 10:07:05AM +0530, Deepa K wrote:
>
> Is it possible to get the rows from table where the day is sunday.
>
> And also is it possible to map the days in all rows to day name and
> similarly is it possible to map the month in all rows to month name.

See the "Data Type Formatting Functions" and "Date/Time Functions
and Operators" sections of the "Functions and Operators" chapter
in the PostgreSQL documentation.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/