If "varmydate" is really a string and doesn't represent an invalid date
(eg. '2/31/04')
this should be working for you.
Peter
"seash" <an*******@discussions.microsoft.com> wrote in message
news:08**********************************@microsof t.com...
Hi
when i execute this query, my query is crashing throwing an exception
"cant convert char datatype to datetime type format'
my query is "insert into mytable(mydate) values ('"+ varmydate+ "')"
iam passing date format as dd/mm/yyyy
my system date is in format dd/mm/yyyy
is there any problem with sql server inaccepting the above format, or is
there any way(universal) to send the datetime format to sql server?
is there any system time conflict with sql server date time format?
-------need help!
-----seash