(select Extract(dow...))

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bot44
    New Member
    • Aug 2008
    • 1

    (select Extract(dow...))

    Hi all

    Does anyone know how to subtract the day of the week (in numbers)
    from the current date

    i tried

    ....(current_da te + (SELECT EXTRACT(DOW FROM current_timesta mp)))

    but got stupid syntax errors?
  • rski
    Recognized Expert Contributor
    • Dec 2006
    • 700

    #2
    i'm afraid my english isn't good enough but writting
    Code:
    select extract(dow from '30-08-2008'::date);
    you get a number representation of saturday (ie number 6).

    I'm afraid it isn't what you need because you use similar query, so if you could specify what you need.

    Comment

    Working...