im strugling with my dataset..

got a small pgsql db with a timestamp column in format YYYY:MM:DD
HH:MM:SS for each record

how could i possibly return day of the week for every record?

any help will be much appreciated
cheers
r

Search Discussions

  • Dann Corbit at Sep 13, 2008 at 5:47 am

    -----Original Message-----
    From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-
    owner@postgresql.org] On Behalf Of ..::rDk::..
    Sent: Sunday, September 07, 2008 8:08 PM
    To: pgsql-general@postgresql.org
    Subject: [GENERAL] weekday from timestamp?

    im strugling with my dataset..

    got a small pgsql db with a timestamp column in format YYYY:MM:DD
    HH:MM:SS for each record

    how could i possibly return day of the week for every record?
    http://www.postgresql.org/docs/8.0/interactive/functions-datetime.html
  • Artacus at Sep 13, 2008 at 8:49 am

    ..::rDk::.. wrote:
    im strugling with my dataset..

    got a small pgsql db with a timestamp column in format YYYY:MM:DD
    HH:MM:SS for each record
    Use to_char

    to_char(tscol, 'dy') -> mon
    to_char(tscol, 'Day') -> Monday
    to_char(tscol, 'D') -> 2

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-general @
categoriespostgresql
postedSep 8, '08 at 3:32a
activeSep 13, '08 at 8:49a
posts3
users3
websitepostgresql.org
irc#postgresql

People

Translate

site design / logo © 2020 Grokbase