Conversion failed when converting date and/or time from character string

Advertisement
October 11

Hi experts,
I'm trying running a query in Microsoft Query but it gives the following error message:
"conversion failed when converting date and/or time from character string"
when asks me the data I'm inserting 31-01-2014
i've copy the query form the forum:
SELECT T1.CardCode, T1.CardName, T1.CreditLine, T0.RefDate, T0.Ref1 'Document Number',
     CASE  WHEN T0.TransType=13 THEN 'Invoice'
          WHEN T0.TransType=14 THEN 'Credit Note'
          WHEN T0.TransType=30 THEN 'Journal'
          WHEN T0.TransType=24 THEN 'Receipt'
          END AS 'Document Type',
     T0.DueDate, (T0.Debit- T0.Credit) 'Balance'
     ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')<=-1),0) 'Future'
     ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')>=0 and DateDiff(day, T0.DueDate,'[%1]')<=30),0) 'Current'
     ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')>30 and DateDiff(day, T0.DueDate,'[%1]')<=60),0) '31-60 Days'
     ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')>60 and DateDiff(day, T0.DueDate,'[%1]')<=90),0) '61-90 Days'
     ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')>90 and DateDiff(day, T0.DueDate,'[%1]')<=120),0) '91-120 Days'
     ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')>=121),0) '121+ Days'
FROM JDT1 T0 INNER JOIN OCRD T1 ON T0.ShortName = T1.CardCode
WHERE (T0.MthDate IS NULL OR T0.MthDate > ?) AND T0.RefDate <= ? AND T1.CardType = 'C'
ORDER BY T1.CardCode, T0.DueDate, T0.Ref1

Advertisement

Replay

Hi,
The above error appears due to date format is differnt from SAP query generator and SQL server.
So you need convert all date in above query to SQL server required format.
Try to convert..let me know if not possible.
Thanks & Regards,
Nagarajan

View 3 Replies

Conversion failed when converting the nvarchar value to data type int when returning nvarchar(max) from stored procedure

November 30

Thank you for your help!!!  I've created a stored procedure to return results as xml.  I'm having trouble figuring out why I'm getting the error message "Conversion failed when converting the nvarchar value '<tr>.....' to data type int.    It s

View All Replies

Conversion failed when converting the varchar value to data type int error

November 30

Hi, I am working on a report which is off of survey information and I am using dynamic pivot on multiple columns. I have questions like Did you use this parking tag for more than 250 hours? If yes specify number of hours. and the answers could be No,

View All Replies

SSRS error "Conversion failed when converting the nvarchar value"

October 11

Hi folks! After SCCM 2012 R2 upgrade, we have errors with self made reports: An error has occurred during report processing. (rsProcessingAborted) Cannot read the next data row for the dataset DataSet2. (rsErrorReadingNextDataRow) Conversion failed w

View All Replies

Error message: Conversion failed when converting the varchar value 'G001985' to data type int

November 30

Here is my script: select name_id, physican_id, primary_name, last_name, first_name from dbo.tblphysiciannames where (physician_id = 'G001985') How to convet the varchar va;e tp data type int? Thank you for your help. SallyDo you have varchar column

View All Replies

Conversion failed when converting the nvarchar value 'MX_PERSON' to data type int

November 30

Hi, I am trying to check user status by running this query: my query take as input the userid= 'USER1234' as parameter select count (distinct mskey) from idmv_vallink_basic_active where mcAttrName='MSKEYVALUE' and mcSearchValue='USER1234'   and mskey

View All Replies

Failed When converting nvarchar value SC1 to int (Cinf)

November 30

Hai,            In my screen conversion master after entering all the data's if i click addon button the error showing Conversion Failed When converting nvarchar value 'SC1' to int (Cinf) where SC1 is the object code of my form. Can anyone suggest wh

View All Replies

What do the dates and the times on the data sheet mean?

November 30

what does the dates and the times on the data sheet mean?    marcus19541 We definitely want to make sure that your data usage reporting is clear so you can monitor everything clearly! The timestamps that appear when viewing your data usage details on

View All Replies

My iphone 4 is so slow, it's almost unusable. I'm no longer even able to text because of the delay when I type and the time it takes for the letters to appear ten or twenty seconds later. Is everyone getting the same, do you think they provide the fix ?

November 30

After installing iOS 7.0.2 My iphone 4 is so slow, it's almost unusable. I'm no longer even able to text because of the delay when I type and the time it takes for the letters to appear ten or twenty seconds later. I hope everyone facing the same. do

View All Replies

The date and the time of printed of purchase order

November 30

Hi, Wich field can me watch the date and the time of printing document like purchase order Thanks in advanceDear, CreateDate:Print date in OPOR DocTime is Print Time in OPORRead other 5 answers

View All Replies

Keyboard shortcuts: current day and date, and current time?

October 11

I would like to know keyboard shortcuts for entering current day and date, and current time (separated entries) in Numbers. Something that Excel does easily. Thank you, IanIan, Numbers does not have predefined key command for Insert Date & Time as yo

View All Replies

I've been given under warranty what us supposed to be a new iPhone 5. When I try and restore it from my iCloud it keeps asking me to sign in with two other Apple ID's that are not know to me. Why is this?

November 30

I've been given under warranty what us supposed to be a new iPhone 5. When I try and restore it from my iCloud it keeps asking me to sign in with two other Apple ID's that are not know to me. Why is this?Adding to KC7GNM's remark (with which I agree)

View All Replies

My iPhone 4s was stolen this weekend and I did the Remote Lock.  What exactly does that do?  Also, if i do the Remote Wipe will that erase all of my data and impede anyone from ever using the phone?

October 11

My iPhone 4s was stolen this weekend and I did the Remote Lock.  What exactly does that do?  Also, if i do the Remote Wipe will that erase all of my data and impede anyone from ever using the phone?The remote lock locks the iphone with a passcode tha

View All Replies

Time Zone...When changing date and time.

November 30

After having updated to version 10.6.1, I am still experiencing the same top sites glitch as everyone else. However, is anyone else's time zone graphics funky (missing squares?) and really unresponsive when moving across the earth from side to side?F

View All Replies

Convert date and time in decimal characters

October 11

Hi, I need to convert the date ad the time in decimal characters. Any idea to do this ? TNX in advance for your help AlexAlex, Please find the attached example. It displays the current time in time format, and it also has separate numeric indicators

View All Replies

How to avoid record rejection due to conversion failed for dirty data

October 11

There is a source delimited flat file created with codepage CP936, simplified Chinese. Data Services XI on HP Unix has to extract this file to a UTF-8 db2 table. However, because the flat file contains a lot of dirty or corrupted characters for Chine

View All Replies

Strange behavior when getting data and storing it into a tdms file

November 30

Hi I am getting data from a VISA device(10bytes every 20ms) in a string buffer and then using indexing array get each element which is 2 bytes , filtering the data in real time using a butterworth filter and then storing the data to a TDMS. The probl

View All Replies

Adding a date and a time to create one channel in a data plugin

November 30

I would like to preface this question with the fact that I am new to VBS programming.  What I want to do is create a plugin. Most of it is done but I am having a problem with adding two times to make one.  I have a text file that stores the date and

View All Replies

Capturing system time and date and the time difference and date difference.

November 30

Hello Experts, i have a requirement the i need to capture select query start time and date as i runthe program on midnight (ie) 11:55 p.m. I tried system fields sy-datum and sy-uzeit for capturing the system date and time when my program runs but it

View All Replies

Report on the dates and the times that software updates went out to partucular machines

November 30

Hello all, I need to know if there is a way to report on the dates and times that certain software updates installed on certain machines. I see a report that could be it but it does not show any results. The report that I am talking about is under So

View All Replies

Tags:

  1. how to post miro for zero grn value
  2. anonymous
  3. Free youtube settings sa nokia503
  4. input VAT.xml
  5. error: err_wis_30270 how to restore file
  6. ni update service disable
  7. fb02 auth objects
  8. backup-spsite when to use sqlsnapshot
  9. 30LF
  10. новости челябинск мир 74
Copyrights 2019 Fcffair BigData Resource, All rights reserved