Hi everyone,
when I run this query in to my SQL database:
SELECT R.CHECK_NUMBER, M.NAME_A, CONVERT(VARCHAR(10),R.CHECK_DATE,101) AS CHECK_DATE,
ISNULL(R.INVOICE_NUM, 'No Number Available')as INVOICE_NUM, R.INVOICE_AMT,
isnull(CONVERT(varchar(10),r.INVOICE_DATE,101),'No Date') as INVOICE_DATE,R.AP_BATCH_ID
FROM AP_DETAIL_REG R JOIN VENDOR_MASTER M ON R.VENDOR_ID= M.VENDOR_ID where R.CHECK_DATE BETWEEN '20130415'and '20130430'
I get results with no problem but when I try to add it to a command in a Crystal Report replacing '20130415'and '20130430' with {?Begin_Date} and {?End_Date} setting the parameters to a String it gives me an error saying that it can convert to a small date time. I cannot set the parameters to date because the format I am trying to get from my webpage is 20130415.
I will appreciate any help and suggestions.
when I run this query in to my SQL database:
SELECT R.CHECK_NUMBER, M.NAME_A, CONVERT(VARCHAR(10),R.CHECK_DATE,101) AS CHECK_DATE,
ISNULL(R.INVOICE_NUM, 'No Number Available')as INVOICE_NUM, R.INVOICE_AMT,
isnull(CONVERT(varchar(10),r.INVOICE_DATE,101),'No Date') as INVOICE_DATE,R.AP_BATCH_ID
FROM AP_DETAIL_REG R JOIN VENDOR_MASTER M ON R.VENDOR_ID= M.VENDOR_ID where R.CHECK_DATE BETWEEN '20130415'and '20130430'
I get results with no problem but when I try to add it to a command in a Crystal Report replacing '20130415'and '20130430' with {?Begin_Date} and {?End_Date} setting the parameters to a String it gives me an error saying that it can convert to a small date time. I cannot set the parameters to date because the format I am trying to get from my webpage is 20130415.
I will appreciate any help and suggestions.