Connecting Tech Pros Worldwide Help | Site Map

(select Extract(dow...))

Newbie
 
Join Date: Aug 2008
Posts: 1
#1: Aug 30 '08
Hi all

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

i tried

....(current_date + (SELECT EXTRACT(DOW FROM current_timestamp)))

but got stupid syntax errors?
Moderator
 
Join Date: Dec 2006
Location: Europe
Posts: 292
#2: Aug 31 '08

re: (select Extract(dow...))


i'm afraid my english isn't good enough but writting
Expand|Select|Wrap|Line Numbers
  1. select extract(dow from '30-08-2008'::date);
  2.  
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.
Reply