List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:March 14 2000 8:54pm
Subject:Re: Sub Date Problem!!
View as plain text  
At 11:07 AM -0800 03-14-2000, aili heng wrote:
>Hi There,
>i have two column named date_start and date_end in my table
>i need to substract the 2 coloumn which are date datatype.
>when i select from the table which date_start=2000-3-31
>and date_end=2000-4-1 to substract 2000-4-1 -2000-3-31
>the database give me the result is 70 days!!!!
>how to handle this promble

You probably want to use:

SELECT TO_DAYS(date1) - TO_DAYS(date2)

or something similar.

>lastly when i select those date_start > current_day
>the database give me all the date which some are < current_day

You need to show the exact query you're using.  Narrative descriptions
don't help much here.

Paul DuBois, paul@stripped
Sub Date Problem!!aili heng14 Mar
  • Re: Sub Date Problem!!Paul DuBois14 Mar