web stats
Conversion failed when converting datetime - Mirth Community

Go Back   Mirth Community > Open Source HIT > General Discussion

Thread Tools Display Modes
Old 08-27-2008, 04:05 PM
doc4child doc4child is offline
Mirth Newb
Join Date: Aug 2007
Posts: 11
Default Conversion failed when converting datetime

FAILURE: Error writing to database:
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?
Reply With Quote
Old 08-28-2008, 04:38 AM
jbartels jbartels is offline
Mirth Guru
Join Date: Oct 2006
Posts: 729
jbartels is on a distinguished road
Default 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
Jon Bartels

Zen is hiring!!!!
Talented healthcare IT professionals wanted. Engineers to sales to management.
Good benefits, great working environment, genuinely interesting work.
Reply With Quote
Old 03-04-2015, 12:00 PM
madhup1981 madhup1981 is offline
What's HL7?
Join Date: Mar 2015
Posts: 1
madhup1981 is on a distinguished road
Default Conversion failed when converting date and/or time from character string.

How do I address this issue?

insert into table_name
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?
Reply With Quote
Old 06-02-2019, 10:06 PM
Rachel83 Rachel83 is offline
Mirth Newb
Join Date: May 2019
Posts: 6
Rachel83 is on a distinguished road

Valuable information. Thank you for sharing.
Clinical Research
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Best practises - How do I ... ? - DateTime conversion nshaik Support 2 10-22-2009 05:29 AM
Converting HL7 to XML r_jyothsna Support 3 06-05-2009 08:16 AM
Converting HL7 Message from 2.1 to 2.3 maym2915 Development 0 10-15-2007 08:51 AM
Failed to read payload data / Failed to load error mappings nshaik Support 2 11-21-2006 01:27 PM
mapping help, convert HL7 datetime to SOAP dateTime jbartels Support 4 11-06-2006 10:41 AM

All times are GMT -8. The time now is 09:36 PM.

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