Article View: borland.public.vdbase.data.sql
Article #242Re: Dates in SQL
From: Steve Koterski
Date: Wed, 13 Jan 1999 00:00
Date: Wed, 13 Jan 1999 00:00
22 lines
1609 bytes
1609 bytes
On Wed, 13 Jan 1999 15:00:56 -0600, "John Staub" <bmds@send_me_nothing_worldnet.att.net> wrote: [...] >There is a date field in the table (crtmld is the field) that I would like >to test. Basically I want to know if (crtmld + 60 < date()) and if so, >include it. I understand SQL does not support the date() function, but does >anyone know of an equivalent in SQL? I've tried a variety of approaches to >no avail. No. Local SQL does not include a function (like CURRENT_DATE in SQL-92) that returns the system date to an SQL statement. You would need to either: 1. Build the SQL statement dynamically and express the date as a literal. 2. Pass the date to the statement using a parameter. ////////////////////////////////////////////////////////////////////////// Steve Koterski "I do most of my writing sitting down. Technical Publications That's where I shine." INPRISE Corporation -- Robert Benchley (1889-1945) http://www.inprise.com/delphi
Technical Details
Message-ID:
<369d26f8.1459659@forums.inprise.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<77j1h0$sll12@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: ff5a1,e21b85d41667a82e X-Google-Attributes: gidff5a1,public From: skoterski@NOSPAMinprise.com (Steve Koterski) Subject: Re: Dates in SQL Date: 1999/01/13 Message-ID: <369d26f8.1459659@forums.inprise.com> X-Deja-AN: 432315393 Content-Transfer-Encoding: 7bit References: <77j1h0$sll12@forums.borland.com> Content-Type: text/plain; charset=us-ascii Organization: INPRISE Corporation, Technical Publications Mime-Version: 1.0 Reply-To: skoterski@NOSPAMinprise.com Newsgroups: borland.public.vdbase.data.sql