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 > Database Server Software > MySQL > days between two dates

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-17-03, 04:56
saikoushal saikoushal is offline
Registered User
 
Join Date: Nov 2003
Posts: 13
days between two dates

Hi all

I want to find the number of days between two dates.
When i used datediff function i got an error like
"invalid column".
How to overcome the above error??
Is there any other function to find the days between two dates??

Sai koushal
Reply With Quote
  #2 (permalink)  
Old 11-17-03, 05:34
Mincer Mincer is offline
Registered User
 
Join Date: Sep 2003
Location: London
Posts: 56
Code:
SELECT
    TO_DAYS( laterDate ) - TO_DAYS( earlierDate ) as days_difference
FROM
    someTable
Matt.
Reply With Quote
  #3 (permalink)  
Old 11-17-03, 06:06
saikoushal saikoushal is offline
Registered User
 
Join Date: Nov 2003
Posts: 13
Hi Matt

Now i am getting error
to_days as "invalid column)......
does the above function depend on oracle version..
i am using 8.1.7.3.0 version of oracle

Sai koushal
Reply With Quote
  #4 (permalink)  
Old 11-17-03, 06:40
khibinite khibinite is offline
Registered User
 
Join Date: Oct 2003
Posts: 63
Quote:
Originally posted by saikoushal
Hi Matt

Now i am getting error
to_days as "invalid column)......
does the above function depend on oracle version..
i am using 8.1.7.3.0 version of oracle

Sai koushal
Hi!

Hey, would you like to get an answer for Oracle question in MySQL forum ?
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