Solved

insert statement date/time conversion

Posted on 2011-09-08
2
184 Views
Last Modified: 2012-05-12
I am trying to insert a line in a table that has two fields combined with date and time.
i am getting the following error what do I do to resolve.

Msg 241, Level 16, State 1, Line 1
Conversion failed when converting date and/or time from character string.
0
Comment
Question by:Amanda Walshaw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
zvytas earned 500 total points
ID: 36508763
The following should work:

INSERT INTO Table (...) VALUES ('2011 09 09 12:15:45')

i.e. date format should be yyyy MM dd HH:mm:ss
0
 
LVL 3

Expert Comment

by:Srm74
ID: 36509098
Can you post the tsql you are having troubles with ??
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question