September 11, 2001 at 4:34 am
Importing into MSSQL froma flat file. Various columns in the table are not nullable, one of which is a date. The format of this data is yyyyMMdd, this obviously needs formatting before its inserted into the table, how can I do this ( via script or a datetime transformation ) bearing in mind that the rest of the details are inserted in a row transform ?
Thanks
Mark
September 11, 2001 at 4:08 pm
in vbscript you can use the formatdatetime function
September 11, 2001 at 7:23 pm
In fact you may not need to convert it - SQL does a fair job of figuring out that the value is a date. Run this code to see what I mean:
select convert(datetime,'20010911')+1
Returns 2001-09-12 00:00:00.000
Andy
September 14, 2001 at 12:36 am
U can also use
Format ("01/01/2001", "MM-DD-YYYY")
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply