Hello, I run Excel 2007. . .
I run several reports that I have coded with help from this forum and it has made my job much easier.
Recently I made an error and ran the wrong set of date in a report. I extract data from a SQL database using a customer report writer that pull the data from the database. I input the dates and at the bottom of the report, I get a string like this:
If I can pull out the two dates, I know what to do to error proof the report.
Does anyone know of a way using VBA? (The two dates above are 19-Sep-11 and 25-Sep-11).
Thanks,
Charles
I run several reports that I have coded with help from this forum and it has made my job much easier.
Recently I made an error and ran the wrong set of date in a report. I extract data from a SQL database using a customer report writer that pull the data from the database. I input the dates and at the bottom of the report, I get a string like this:
Code:
SQL = select distinct sum(firstpass) as column1, count(totaltests) as column2, sum(implied) as column3, sum(impliedcount) as column4, customerid, assemblyno, processtyp, prodoriginctr AS fieldvalue FROM PLAID.dbo.EventYields (NoLock) where processtyp like '%' and firsttest between '19-Sep-11 00:00:00' and '25-Sep-11 23:59:59' and customerid like '345' and assemblyno like '%' and prodoriginctr like '603' group by customerid, assemblyno, processtyp, prodoriginctr ORDER BY 8, 5, 6, 7
If I can pull out the two dates, I know what to do to error proof the report.
Does anyone know of a way using VBA? (The two dates above are 19-Sep-11 and 25-Sep-11).
Thanks,
Charles