LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Calculating a date within the OLE DB query

Within my OLE DB query, I would like to use a calculated date for the
selection criteria. I'm using Excel to create a summary report against a
SQL database. Completion date is one of the fields, I only want to select
those records that are completed on/after the Monday three weeks ago, NOW() -
((WEEKDAY(NOW(),3)) + 21). The report shows the prior three weeks, plus the
current week's information.

Copy of the OLE DB query - I would like to replace the "10/10/2005" with the
calculated date.

SELECT reqID, reqDate, fName, lName, inputTbl.userInput, adminsTbl.admFname,
completeDate FROM requestsTbl, userTbl, InputTbl, adminsTbl WHERE
(requestsTbl.reqDate LIKE '%2005%') AND completeDate '10/10/2005' and
requestsTbl.userID = userTbl.userID AND requestsTbl.userInputID =
inputTbl.userInputID AND (requestsTbl.assignedTo LIKE adminsTbl.adminID)
ORDER BY completeDate, admFname, reqID

Thanks,

Gary Sakaguchi
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Resolved my query regarding total sum calculating tushar Excel Discussion (Misc queries) 1 May 27th 09 11:32 AM
Calculating Difference Between Start Date & Time And End Date & Ti Samwar Excel Discussion (Misc queries) 2 December 19th 05 12:42 PM
Calculating recurring date in following month, calculating # days in that period Walterius Excel Worksheet Functions 6 June 4th 05 11:21 PM
Calculating days between current date and a date in future NETWORKDAYS() function Faheem Khan Excel Worksheet Functions 2 February 10th 05 07:18 PM
Using imported Query & Calculating Dates Woodkat Excel Worksheet Functions 1 December 8th 04 05:15 PM


All times are GMT +1. The time now is 05:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"