Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old August 30th, 2008, 01:15 PM
Newbie
 
Join Date: Aug 2008
Posts: 1
Default (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_date + (SELECT EXTRACT(DOW FROM current_timestamp)))

but got stupid syntax errors?
Reply
  #2  
Old August 31st, 2008, 06:25 PM
Moderator
 
Join Date: Dec 2006
Posts: 250
Default

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
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles