Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default QUERY FOR TODAY RECORDS

Dear All,

I have the following SQL for 25-04-07 but I want to change it for
today means that if I open it tomorroe then it will show records for
26-04-07 not 25-04-07.

My SQL is :

SELECT `Sheet1$`.date, `Sheet1$`.party, `Sheet1$`.amount
FROM `C:\tmp.xls`.`Sheet1$` `Sheet1$`
WHERE (`Sheet1$`.date={ts '2007-04-25 00:00:00'})

Kindly solve my problem.

Thnx

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default QUERY FOR TODAY RECORDS

Shaqil,
Assuming your SQL is valid/working, you can use:

....WHERE (`Sheet1$`.date={ts '" & Format(Now(), "yyyy-mm-dd hh:mm:ss") &
"'})"

Note the inclusion of the ' around the date.

NickHK

"shaqil" wrote in message
ups.com...
Dear All,

I have the following SQL for 25-04-07 but I want to change it for
today means that if I open it tomorroe then it will show records for
26-04-07 not 25-04-07.

My SQL is :

SELECT `Sheet1$`.date, `Sheet1$`.party, `Sheet1$`.amount
FROM `C:\tmp.xls`.`Sheet1$` `Sheet1$`
WHERE (`Sheet1$`.date={ts '2007-04-25 00:00:00'})

Kindly solve my problem.

Thnx



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default QUERY FOR TODAY RECORDS

On Apr 25, 2:24 pm, "NickHK" wrote:
Shaqil,
Assuming your SQL is valid/working, you can use:

...WHERE (`Sheet1$`.date={ts '" & Format(Now(), "yyyy-mm-dd hh:mm:ss") &
"'})"

Note the inclusion of the ' around the date.

NickHK

"shaqil" wrote in message

ups.com...

Dear All,


I have the following SQL for25-04-07but I want to change it for
today means that if I open it tomorroe then it will show records for
26-04-07not25-04-07.


My SQL is :


SELECT `Sheet1$`.date, `Sheet1$`.party, `Sheet1$`.amount
FROM `C:\tmp.xls`.`Sheet1$` `Sheet1$`
WHERE (`Sheet1$`.date={ts '2007-04-25 00:00:00'})


Kindly solve my problem.


Thnx


I have just paste your words in SQL as it is. but is not working.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default QUERY FOR TODAY RECORDS

What does "but is not working" mean ?
You have help us as we can see what you doing.

print you SQL string to the Immediate window to see what you actually using.
Was it working before ?

NickHK

"shaqil" wrote in message
oups.com...
On Apr 25, 2:24 pm, "NickHK" wrote:
Shaqil,
Assuming your SQL is valid/working, you can use:

...WHERE (`Sheet1$`.date={ts '" & Format(Now(), "yyyy-mm-dd hh:mm:ss") &
"'})"

Note the inclusion of the ' around the date.

NickHK

"shaqil" wrote in message

ups.com...

Dear All,


I have the following SQL for25-04-07but I want to change it for
today means that if I open it tomorroe then it will show records for
26-04-07not25-04-07.


My SQL is :


SELECT `Sheet1$`.date, `Sheet1$`.party, `Sheet1$`.amount
FROM `C:\tmp.xls`.`Sheet1$` `Sheet1$`
WHERE (`Sheet1$`.date={ts '2007-04-25 00:00:00'})


Kindly solve my problem.


Thnx


I have just paste your words in SQL as it is. but is not working.



Reply
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
Formula Returning Records # of Days from Today in Excel Pettitte46 Excel Worksheet Functions 2 July 20th 08 08:54 PM
limit records in query dsharbaugh Excel Discussion (Misc queries) 2 January 16th 08 07:53 AM
QUERY FOR TODAY RECORDS shaqil Excel Worksheet Functions 3 May 2nd 07 10:21 AM
No of Records returned by a Query Soniya[_4_] Excel Programming 1 April 27th 05 02:28 PM
How to Get records from a query in access and put them in Excel Andy Wiggins Excel Programming 0 December 21st 03 10:51 AM


All times are GMT +1. The time now is 01:34 AM.

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"