home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!darwin.sura.net!bogus.sura.net!howland.reston.ans.net!usc!elroy.jpl.nasa.gov!swrinde!emory!emory!not-for-mail
- From: dave.snyder@snide.com (Dave Snyder)
- Newsgroups: comp.databases.informix
- Subject: Re: 4GL date routine, HOW?
- Date: 7 Jan 1993 15:18:04 -0500
- Organization: Mailing List Gateway
- Lines: 34
- Sender: walt@mathcs.emory.edu
- Distribution: world
- Message-ID: <1ii35sINNmj6@emory.mathcs.emory.edu>
- Reply-To: dave.snyder@snide.com (Dave Snyder)
- NNTP-Posting-Host: emory.mathcs.emory.edu
- X-Informix-List-ID: <list.1760>
-
- Quoting Ed Gulczynski...
- }
- } In 4gl I'm trying to calc. the number of days between 2 dates
- } Here's what I've done. This doesn't work at all????
- } I'd appreciate it if you could send me some working code that would
- } yield p_diff as a valid integer value.
- }
- } .
- } .
- } GLOBALS
- } p_diff INTEGER
- } END GLOBALS
- } .
- } .
- }
- } LET p_diff = TODAY - 60 UNITS DAY
- } DISPLAY "diff=",
- } p_diff
- }
- You are making things harder than they need to be... to calculate say,
- the number of days since an invoice was cut, do this:
-
- GLOBALS
- DEFINE p_diff INTEGER
- DEFINE invoice_date DATE
- END GLOBALS
-
- LET p_diff = TODAY - invoice_date
-
- DAS
- --
- David Snyder @ Snide Computer Services - Folcroft, PA Current Release
- is db4glgen-3.9
- UUCP: ..!uunet!das13!dave INTERNET: dave.snyder@snide.com
-