I have string date="20130613070000+1000"
I convert to datatime by using:
date_dt = DateTime.ParseExact(date, "yyyyMMddHHmmsszzz", null, DateTimeStyles.None);
results its date_dt=13/06/2013 12:00:00 AM
I insert into database SQL Server using
insert into date (startdate) VALUES ('13/06/2013 12:00:00 PM')
I have a problem - I get an error:
Msg 242, Level 16, State 3, Line 6
The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.
What's the solution for dt_date
convert with fomat MM/dd/yyy
?