Re: Newbie: Konvertierungsproblem

From: Frank Kalis (nospam_at_insidesql.de)
Date: 07/07/04


Date: Wed, 7 Jul 2004 08:23:02 -0700

Was ist mit SET DATEFORMAT ymd

-- 
--Frank
http://www.insidesql.de
"Gerald K." wrote:
> Hallo Frank,
> 
> nettes Beispiel. Dieses Beispiel funktioniert bei mir natürlich auch.
> Allerdings bekomme ich den String aus einer anderen entfernten Datenbank.
> Der entfernte DB-Server ist bei mir als Linked Server eingebunden damit ich
> darauf zugreifen kann.
> 
> So lange ich mit Konstanten herumexperimentiere, wie du in deinem Beispiel,
> funktioniert alles wunderbar.
> 
> Ich hab gerade folgendes versucht:
> 
> select ISDATE(replace(C_TURNOVER, '.', '-')), C_TURNOVER
>     from db_server_old.sourcedb.dbo.import
> 
> Mit folgendem Ergebnis (nur ein Ausschnitt):
> 
> 1    2003.02.11 18:00:03
> 1    2001.12.07 11:51:00
> 0    2002.02.13 14:53:00
> 0    2002.02.22 20:40:00
> 
> Sieht so aus, als prüfe IsDate() auf yyyy.dd.mm ab, anstatt auf yyyy.mm.dd
> Ob das für's CONVERT eine Rolle spielt, weiß ich nicht.
> 
> Gruss, Gerald
> 
> "Frank Kalis" <nospam@insidesql.de> wrote in message
> news:CBE1AD27-AC2B-46D7-A191-622B82562753@microsoft.com...
> > CREATE TABLE date_t
> > (
> > col1 CHAR(20)
> > )
> > INSERT INTO date_t VALUES( '2001.04.30 09:37:04')
> > SELECT CONVERT(datetime,col1, 102) FROM date_t
> > DROP TABLE date_t
> >
> > (1 row(s) affected)
> >
> > ------------------------------------------------------ 
> > 2001-04-30 09:37:04.000
> 
> 
> 


Relevant Pages

  • Re: Exchange Web Access
    ... "Gerald Aigenbauer" wrote: ... > hi frank! ... Next by Date: ...
    (microsoft.public.de.exchange)
  • Re: Parallels
    ... In article, Frank ... oh, BTW, you really should try harder, Gerald... ... to come up with a variation on my last name that I haven't heard at ...
    (comp.sys.mac.apps)
  • Marvell/SysKonnect YukonII source code available
    ... from the their website already. ... Many thanks to Gerald and Frank at SysKonnect for working with us and ...
    (freebsd-current)
  • Marvell/SysKonnect YukonII source code available
    ... from the their website already. ... Many thanks to Gerald and Frank at SysKonnect for working with us and ...
    (freebsd-net)