467,084 Members | 1,243 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,084 developers. It's quick & easy.

Insert query crash(sql server), Date time format, server is not accepting

H

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
-----seas

Nov 15 '05 #1
  • viewed: 10340
Share:
1 Reply
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

Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Ricardo | last post: by
7 posts views Thread by Arek | last post: by
reply views Thread by getkapilcs@gmail.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.