Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Jamie, I will try and work with this on Monday..
THanks alot. DBAL -----Original Message----- "DBAL" wrote ... I need to have the user enter a starting date and an ending date to pass to the SQL server for retrieving invoices. I tried to convert the invoice date to a string for comparison with my variables but it didn't work. My preferred approach is to store in memory as a VBA Date type and use an unambiguous date string in sql code e.g. WHERE MyDateCol BETWEEN '01 JUN 2004' AND '30 JUN 2004' This SQL statement will be embedded in the VBA behind Excel... My preferred approach is to use a stored procedure e.g. CREATE PROCEDURE MyStoredProc ( start_date DATETIME, end_date DATETIME ) AS SELECT RefID, DateEffective, Earnings FROM EarningsHistory WHERE DateEffective BETWEEN start_date AND end_date; and call it from Excel using e.g. EXEC MyStoredProc '01 JUN 2004', '30 JUN 2004' Jamie. -- . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Passing Dates criteria in MS Query | Excel Discussion (Misc queries) | |||
passing dates in a conditional sum(if) | New Users to Excel | |||
Passing Excel Info To Visio | Excel Discussion (Misc queries) | |||
passing excel certification | Excel Worksheet Functions | |||
Passing a parameter to Excel | Excel Programming |