🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: converting dates to string

#109
From: Steve Koterski
Date: Sat, 16 Jan 1999 00:00
28 lines
1944 bytes
On Fri, 15 Jan 1999 23:37:09 +0100, tt <thomas@trautwein.com> wrote:

>steve,
>i did it with CAST:
>
>... CAST( OrderDate AS CHAR( 12 )) ) AS NewField...

Good.

>it works fine. although the documentation says that it only returns dates in
>us-format i get them in european-format the way i want. 1900 date values are
>returned as 2-digit-values ("31/12/98"), 2000 values come with 4 digits
>("31/12/2001").
>
>the only differencs to geman dates is, that we use dots instead of slashes. i
>could change this with a lot of code but i leave it as it is.

In local SQL, DATE and TIMESTAMP *literals* must be in the US format.
Column values are another matter. The format in which column values (or
other types of returned dates) will be in are predicated on other factors.
Primarily, this is the format selected at the Windows or application level
for displaying date values.

//////////////////////////////////////////////////////////////////////////
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: <369fe47f.30344774@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> <369a533b.11488027@forums.inprise.com> <369FC314.ABA351AD@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/16
Message-ID: <369fe47f.30344774@forums.inprise.com>
X-Deja-AN: 433170320
Content-Transfer-Encoding: 7bit
References: <3699120D.76142F68@trautwein.com> <36995690.7C61@sierratel.com> <369A4B85.6D70E039@trautwein.com> <369a533b.11488027@forums.inprise.com> <369FC314.ABA351AD@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