converting date char values with 'hhmiss' to datetime
Posted on 2003-02-27
I am in the process of rewriting a mysql script for sql server 2000 use. I have date values that are in the format 'yymmddhhmiss'. I need to convert these strings into datetime format but when including the following in the create table statement:
date as convert(datetime, convert(char(12), getdate())),
I get 'Insert Error: Column name or number of supplied values does not match table definition.'
I think I need to include a style value after getdate() but there doesn't appear to be one which fits this format. Any help would be appreciated.