Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
khasimvali85
Creator II
Creator II

Date Conversion Problem

Hi Community,

Can any body solve this Error when i connect to data base Table showing error like

''ErrorSource: Microsoft OLE DB Provider for SQL Server, ErrorMsg: Conversion failed when converting date and/or time from character string.''

I Change Given format below

,Convert(Varchar,[Date_Field],103) as Date_Field   is it right?

Thanks in Advance

Regards,

Khasim.

1 Solution

Accepted Solutions
ashfaq_haseeb
Champion III
Champion III

Like this

Calls:

load  [Complaint_ID]

      ,date(floor([complaint_date])) as complaint_date

      ,[complaint_no]

      ,[count]

      ,date(floor([Reminder_Date])) as Reminder_Date

      ,[NewAppointment]

      ,

View solution in original post

20 Replies
ashfaq_haseeb
Champion III
Champion III

Hi,

Can you paste your script here?

you can try something like this

load

f1,

Date(floor(YourDateField)) as Date,

f3;

sql select * from table.

Regards

ASHFAQ

rubenmarin

Hi, Can you try?:

Convert(datetime,[Date_Field],103) as Date_Field

MK_QSL
MVP
MVP

Try

convert(varchar(10),[Date_Field],103) as Date_Field

crusader_
Partner - Specialist
Partner - Specialist

Hi,

You are trying to use specific MSSQL convert() function in your SQL statement, it's not quite right.

Try Ashfaq's solution to solve your problem.

Regards,

Andrei

khasimvali85
Creator II
Creator II
Author

HI Ruben,

               Thanks for Reply but its not working

Regards,

Khasim

khasimvali85
Creator II
Creator II
Author

Hi Ashfaq,

My Script is

Calls:

SELECT [Complaint_ID]

      ,Convert(Varchar,[complaint_date],103) as complaint_date

      ,[complaint_no]

      ,[count]

      ,Convert(datetime,[Reminder_Date],103) as Reminder_Date

      ,[NewAppointment]

      ,

ashfaq_haseeb
Champion III
Champion III

Hi,

From where you are reading this SQL or QVD?

regards

ASHFAQ

khasimvali85
Creator II
Creator II
Author

Hi,

From SQL

ashfaq_haseeb
Champion III
Champion III

If it is qvd try like this

Calls:

SELECT [Complaint_ID]

      ,date(floor([complaint_date])) as complaint_date

      ,[complaint_no]

      ,[count]

      ,date(floor([Reminder_Date])) as Reminder_Date

      ,[NewAppointment]

      ,