how to change these Date Time strings to sql server DateTime Type:
"Thu May 07 19:19:27"
"Thu May 07 19:19:33"
"Thu May 07 19:19:34"
"Thu May 07 19:19:34"
"Thu May 07 19:19:35"
how to change these Date Time strings to sql server DateTime Type:
"Thu May 07 19:19:27"
"Thu May 07 19:19:33"
"Thu May 07 19:19:34"
"Thu May 07 19:19:34"
"Thu May 07 19:19:35"
Are you looking at converting those date strings into DateTime values using an SQL stored function/procedure or in some external program?
Here's a snippet of TSQL that you may be able to use in a stored procedure or function to convert the strings into SQL DateTime.
DECLARE
@Year char(4), /* the DateTime needs a year */
@DateString varchar(20),
@DateVariable DateTime;
SET @Year = '2009';
SET @DateString = 'Thu May 07 19:19:27'; /* any of the dates in your list */
SET @DateVariable = CONVERT(DateTime, @Year
+ SUBSTRING(@DateString, 4, LEN(@DateString)));
/*
After the conversion, @DateVariable contains '2009-05-07 19:19:27.000'
*/