Sunday, February 12, 2012

Converting problem

Hello there
I'm imporing data from csv files.
one of the field with data lile '20060105' should be converted to date.
Vbscript isdate function cannot convert it to date, but sql server can
convert it.
Does someone knows whay?"Roy Goldhammer" <roy@.hotmail.com> wrote in message
news:O7A0OcAdGHA.3388@.TK2MSFTNGP05.phx.gbl...
> Hello there
> I'm imporing data from csv files.
> one of the field with data lile '20060105' should be converted to date.
> Vbscript isdate function cannot convert it to date, but sql server can
> convert it.
> Does someone knows whay?
>
Because SQL is better than VB Script? :-)
Regards
Colin Dawson
www.cjdawson.com|||when you do an import, the data in the column in the import file is matched
up with the column in the table. an implicit conversion occurs to get load
the data into the table. your text string '20060105' is converted/seen as
'YYYYMMDD'. Thus tis a valid value.
vb hostscript will intepret the value just as a string.
-oj
"Roy Goldhammer" <roy@.hotmail.com> wrote in message
news:O7A0OcAdGHA.3388@.TK2MSFTNGP05.phx.gbl...
> Hello there
> I'm imporing data from csv files.
> one of the field with data lile '20060105' should be converted to date.
> Vbscript isdate function cannot convert it to date, but sql server can
> convert it.
> Does someone knows whay?
>

No comments:

Post a Comment