Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
khasimvali85
Contributor 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

Re: Date Conversion Problem

Like this

Calls:

load  [Complaint_ID]

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

      ,[complaint_no]

      ,[count]

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

      ,[NewAppointment]

      ,

20 Replies

Re: Date Conversion Problem

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

Re: Date Conversion Problem

Hi, Can you try?:

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

MVP
MVP

Re: Date Conversion Problem

Try

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

crusader_
Valued Contributor

Re: Date Conversion Problem

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
Contributor II

Re: Date Conversion Problem

HI Ruben,

               Thanks for Reply but its not working

Regards,

Khasim

khasimvali85
Contributor II

Re: Date Conversion Problem

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]

      ,

Re: Date Conversion Problem

Hi,

From where you are reading this SQL or QVD?

regards

ASHFAQ

khasimvali85
Contributor II

Re: Date Conversion Problem

Hi,

From SQL

Re: Date Conversion Problem

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]

      ,

Community Browser