Mirth Community

Mirth Community (http://www.mirthcorp.com/community/forums/index.php)
-   General Discussion (http://www.mirthcorp.com/community/forums/forumdisplay.php?f=9)
-   -   Conversion failed when converting datetime (http://www.mirthcorp.com/community/forums/showthread.php?t=1865)

doc4child 08-27-2008 04:05 PM

Conversion failed when converting datetime
 
FAILURE: Error writing to database:
SQLException
Conversion failed when converting datetime from character string. Query: INSERT INTO sma values (?, ?,0 ,0,0,0,0,0,0,0,0,0,0) Parameters: [0995819, 200808260357]


I am getting this error? How to fix it?

jbartels 08-28-2008 04:38 AM

Re:Conversion failed when converting datetime
 
Can you post your channel please?

If you are dealing with any datetime fields from a message make sure they are formatted so that your database can understand them.

Post edited by: jbartels, at: 08/28/2008 05:39

madhup1981 03-04-2015 12:00 PM

Conversion failed when converting date and/or time from character string.
 
How do I address this issue?

insert into table_name
(first_name,last_name,creation_dt)
values(${firstname},${Lastname},cast(${SYSTIME} as DATETIME)).

I have tried to use cast and convert but still unable to insert data into the table. We are using SQL db and the column is datetime type.

Can you please suggest a way to address this?

Rachel83 06-02-2019 10:06 PM

Valuable information. Thank you for sharing.


All times are GMT -8. The time now is 10:22 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation