cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Conversion error in node Data Stream Out

Hi all,

 

I have a problem with my workflow loading data from db to alteryx (Data Stream Out says: Conversion failed when convertingdate and/or time from character string.). In the SQL statement (used in Connect In-DB) I'm converting string to date (see the following example/extract):

Select StartTime... from ... where convert(date,StartTime)>'2017-10-31 00:00:00'

Date format is like you can see 'YYYY-MM-DD HH:MM:SS'.

 

Does anyone has an idea what I'm doing wrong? 

Alteryx
Alteryx

Hi @david2010!

 

According to this article, the CONVERT function accepts a 3rd optional argument "style" that specifies "the format used to convert between datatypes, such as a date format or string format"

In your case, I'd suggest the value 120, that corresponds to the format "yyyy-mm-dd hh:mi:ss".

 

Your query would be : Select StartTime... from ... where convert(date,StartTime,120)>'2017-10-31 00:00:00'

 

Let me know how it works.

 

John

John Gonggrijp Dowe
Customer Support Engineer
Alteryx