Subject Re[2]: [IBO] simple question
Author lseptimiu@yahoo.com
Hello Helen,

Friday, August 19, 2005, 12:50:09 PM, you wrote:

> At 02:12 AM 19/08/2005 -0700, you wrote:
>>Hello IBObjects,
>>
>>   Maybe this is a silly question, but I really
need
>>help. I need to
>>   find the number of days that passed between two
>>dates  inside of a
>>   procedure. I know one way, by decomposing the
dates
>>in zz-mm-yyyy
>>   but, I try to find a simple way to do that...
does
>>anyone can help
>>   me find the right solution?! is this the best
>>solution?!
>>   Looking forward....
>
> Just subtract the later date from the earlier one. 
The result is the
> interval in days.
>
> create procedure GetInterval (date1 date, date2
date)
> returns time_passed integer)
> as
> begin
>    time_passed = -1;
>    if (date2 < date1) then Exit;
>    time_passed = date2 - date1;
> end
>
> If you are comparing timestamp rather than date
types, make the return
> variable double precision.
>
> Off-topic for IBO, by the way.
>
> Helen
>
>
>

>
>
___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity
to Firebird or InterBase
>              without the need for BDE, ODBC or any
other layer.
>
>
___________________________________________________________________________
> http://www.ibobjects.com - your IBO community
resource for Tech Info papers,
> keyword-searchable FAQ, community code
contributions and more !          

>

>
> SPONSORED LINKS
> Database design software Database
development software
> Membership database software Resume
database software
> Database software Inventory database software

>
>

> YAHOO! GROUPS LINKS
>
>
>  Visit your group "IBObjects" on the web.
>    To unsubscribe from this group, send an email
to:
>  IBObjects-unsubscribe@yahoogroups.com
>    Your use of Yahoo! Groups is subject to the
Yahoo! Terms of Service.
>
>
>

>
>
>
I know,
but, thank you very much

--
Best regards,
lseptimiu
mailto:lseptimiu@...


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com