If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > Date Function on Redbrick or Oracle

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-22-04, 23:24
aus_user aus_user is offline
Registered User
 
Join Date: Jan 2004
Posts: 7
Date Function on Redbrick or Oracle

Is the function for getting system date for BRIO operating within
Redbrick DB is:

getDate();

and for Oracle is:

SysDate();


I am trying to run a report (operating in Redbrick DB) which
captures PAST THREE MONTHS. This report has to run EVERY WEEK.

So my logic is to find out TODAY's DATE and MINUS 3 months.

Also, what is the syntax or formula to MINUS 3 months???

sysDate() - 90 ?

please assist.

Thanks.

Anton
Reply With Quote
  #2 (permalink)  
Old 01-23-04, 00:08
r123456 r123456 is offline
Registered User
 
Join Date: Sep 2003
Location: The extremely Royal borough of Kensington, London
Posts: 778
Oracle,

select SYSDATE - Interval '3' Month from dual;

OR

select add_months(sysdate, -3) from dual;
__________________
Bessie Braddock: Winston, you are drunk!
Churchill: And Madam, you are ugly. And tomorrow, I'll be sober, and you will still be ugly.
Reply With Quote
  #3 (permalink)  
Old 01-23-04, 00:19
aus_user aus_user is offline
Registered User
 
Join Date: Jan 2004
Posts: 7
thanks.

but can I get the current date without using the dual table, if it's on oracle?

how about redbrick?

the db i'm querying on is on redbrick.
Reply With Quote
  #4 (permalink)  
Old 02-03-04, 15:39
konnurureddy konnurureddy is offline
Registered User
 
Join Date: Feb 2004
Posts: 1
Arrow for current date in redbrick

U Can get today date in rebrick using
current_date.


Thanks,
Praveen.
Reply With Quote
  #5 (permalink)  
Old 02-03-04, 18:44
aus_user aus_user is offline
Registered User
 
Join Date: Jan 2004
Posts: 7
yep. thanks!
Reply With Quote
  #6 (permalink)  
Old 04-17-08, 15:27
vasu4us vasu4us is offline
Registered User
 
Join Date: Jan 2008
Posts: 8
I have similar requirment but inmycase i just need month and year in the format MMYYYY. that is for curent date - 3month
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On