🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Store datetime field as String

#801
From: Quinn Wildman (CodeGear Develope...
Date: Wed, 09 May 2007 15:51
18 lines
1527 bytes
You could use extract. Here is a trivial example:

create database foo (f1 string);
insert into foo values (extract(day from current_date) || '/' || 
extract(month from current_date) || '/' || extract(year from current_date));

Note that this example uses implicit type casting.

Craig Cookesley wrote:
> Thanks Wayne
> 
> That worked, except I get the date as DD-MMM-YY when I would like DD/MM/YY
> 
> ie  9- MAY-20 TO 09/05/07
> 
> Is this possible?
> 
>
Technical Details
Message-ID: <4641ed96$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <4640605c@newsgroups.borland.com> <464088c2@newsgroups.borland.com> <46412e4d@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,d8456dd5bcafd5a4
X-Google-Attributes: gid114a0e,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Wed, 09 May 2007 08:51:41 -0700
From: "Quinn Wildman (CodeGear Developer Support)" <qwildman@nospam.codegear.com>
User-Agent: Thunderbird 1.5.0.10 (Windows/20070221)
MIME-Version: 1.0
Newsgroups: borland.public.interbase.sql
Subject: Re: Store datetime field as String
References: <4640605c@newsgroups.borland.com> <464088c2@newsgroups.borland.com> <46412e4d@newsgroups.borland.com>
In-Reply-To: <46412e4d@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 10.143.19.108
Message-ID: <4641ed96$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1178725782 10.143.19.108 (9 May 2007 08:49:42 -0700)
Lines: 18
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail