🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Store datetime field as String

#803
From: Craig Cookesley
Date: Thu, 10 May 2007 00:46
30 lines
1781 bytes
Thanks again

I might have to bite the bullet and update the definition and related code.

Quinn I will try the extract, Thanks
"Wayne Niddery [TeamB]" <wniddery@chaffaci.on.ca> wrote in message 
news:464088c2@newsgroups.borland.com...
> Craig Cookesley wrote:
>>
>> I need to update a field defined as varchar(8) with a datetime field
>> in a trigger
>>
>> The field is used extensive in code so to change the field type would
>> be a big job
>>
>> i was hoping to cast or convert the datatime field to string before
>> update
>
> Use cast.
>
> Update table set somefield = cast(current_date as varchar(8)) where 
> <condition>
>
>
> -- 
> Wayne Niddery - Winwright, Inc (www.winwright.ca)
> "Some see private enterprise as a predatory target to be shot, others
> as a cow to be milked, but few are those who see it as a sturdy horse
> pulling the wagon." - Winston Churchill
> 
Technical Details
Message-ID: <46426b6a@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <4640605c@newsgroups.borland.com> <464088c2@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
From: "Craig Cookesley" <ccc@planet.net.au>
Newsgroups: borland.public.interbase.sql
References: <4640605c@newsgroups.borland.com> <464088c2@newsgroups.borland.com>
Subject: Re: Store datetime field as String
Date: Thu, 10 May 2007 10:46:37 +1000
Lines: 32
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 203.214.87.79
Message-ID: <46426b6a@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1178757994 203.214.87.79 (9 May 2007 17:46:34 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail