🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.sql
Article #978

Re: dates difference

#978
From: Bill Todd
Date: Tue, 03 Apr 2007 15:28
15 lines
1432 bytes
aleplgr wrote:

> 
> Hi! I'm trying to calculate a dates difference  in a stored procedure
> in InterBase 7.5:  given two dates in dd/mm/yyyy format I need its
> difference in days, like this one in SQL 2000:   
>  set @Days = (SELECT DATEDIFF(DAY,@val1, @val2))
> 
>  is there a predefined function to do that? couldn't find it in the
> Language Reference nor Data Reference..

Just subtract one date from the other to get the difference in days.

-- 
Bill Todd (TeamB)
Technical Details
Message-ID: <46126499$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!feeder3.cambrium.nl!feed.tweaknews.nl!newsfeed.kamp.net!newsfeed.kamp.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <46122eec$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,2c9d003309cca840
X-Google-Attributes: gid114a0e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Bill Todd" <no@no.com>
Subject: Re: dates difference
Newsgroups: borland.public.interbase.sql
References:  <46122eec$1@newsgroups.borland.com>
Organization: The Database Group, Inc.
User-Agent: XanaNews/1.18.1.6
X-Face: ":yn4zt^A_dn>6~{YJmu^B\'4w)e:apPM\VC=Dvf&*tASxX9|BYczkFd$xr.$vNSZ[3Uobr p]c4\+\l){!WQI.$]veP({HLd;CDYH?iN
NNTP-Posting-Host: 216.207.211.19
Message-ID: <46126499$1@newsgroups.borland.com>
Date: 3 Apr 2007 07:28:41 -0800
X-Trace: newsgroups.borland.com 1175610521 216.207.211.19 (3 Apr 2007 07:28:41 -0800)
Lines: 15
X-Authenticated-User: btodd
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!feeder3.cambrium.nl!feed.tweaknews.nl!newsfeed.kamp.net!newsfeed.kamp.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail