🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.vdbase.data.sql
Article #228

Re: converting dates to string

#228
From: Steve Koterski
Date: Mon, 11 Jan 1999 00:00
19 lines
1647 bytes
On Mon, 11 Jan 1999 20:05:42 +0100, tt <thomas@trautwein.com> wrote:

>rick ,
>thanks for answering.
>dtos() unfortunately does not work, local sql does not offer this function.

There is no function in SQL (or local SQL) equivalent to the dBASE DTOS
function. The closest single function is CAST, which can convert a DATE or
DATETIME value to CHAR -- but in the format MM/DD/YY. The DTOS function
would convert to string in the format YYYYMMDD. To get the effects of DTOS
in a local SQL statement, you would need to use combinations of EXTRACT and
CAST, concatenating the values together in the order you desire. Another
post in this thread describes this.

//////////////////////////////////////////////////////////////////////////
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: <369a533b.11488027@forums.inprise.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3699120D.76142F68@trautwein.com> <36995690.7C61@sierratel.com> <369A4B85.6D70E039@trautwein.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: ff5a1,374a1c05f0f1b280
X-Google-Attributes: gidff5a1,public
From: skoterski@NOSPAMinprise.com (Steve Koterski)
Subject: Re: converting dates to string
Date: 1999/01/11
Message-ID: <369a533b.11488027@forums.inprise.com>
X-Deja-AN: 431352282
Content-Transfer-Encoding: 7bit
References: <3699120D.76142F68@trautwein.com> <36995690.7C61@sierratel.com> <369A4B85.6D70E039@trautwein.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