473,320 Members | 1,845 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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
1 10682
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Ricardo | last post by:
How can I make a insert sql string to insert direct in a table(not a dataset) using the textbox.text propert??
7
by: Arek | last post by:
Hey, I am inserting values in the table: Dim sqlcomm1 As SqlCommand = New SqlCommand("INSERT INTO tblTasks (idTask, outdate) VALUES ('" & IDTask.text & "','" & txtOutdate.Text & "')", conn)...
6
by: scott | last post by:
what is the best way to send data to and query SQL 2005 server express edition db hosted on a dedicated server with ISP ? i need to query it directly from an application on my LAN (asp site on...
0
by: getkapilcs | last post by:
Hi, i want to query sql server using xml, where the required fields are to be specified in the xml dynamically. can you tell me how to generate such a xml file? regards, Kap
1
by: sandeep.damodar | last post by:
Hello, I need help.. I am just trying to insert data from the datagrid to data source, using insert sql statement.
1
by: yzlin04 | last post by:
Does anyone know how to insert date into vb.net datagrid by using INSERT INTO command? From the code below, the error message is in cmd.ExecuteNonQuery() line. Here is the error message: An...
0
by: raoofahmedkhan | last post by:
Hi All, I am trying to develop an application in vb.net in which i need to insert date in oracle database, my application is in vb.net. i am getting some problem while inserting date. Does...
9
by: Access | last post by:
In my user interface if a user doesn't have access to a field in the database I lock it and make the background color yellow. Problem is I'm maintaining permissions in two different places. On...
4
by: awigren | last post by:
I am making a database right now in MS Access. The reason is because we are trying to get away from the Excel file that we originally stored the data for more easy access. I had to put one of my...
19
by: phill86 | last post by:
Hi I am re-posting this thread because it has become very confusing and I have got some way to solving the problem so it is a slightly different question from the initial thread. here is the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.