Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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.worksheet.functions
external usenet poster
 
Posts: 8
Default QUERY FOR TODAY RECORDS

If you have one cell with the =TODAY() formula, then run a macro that copies
and pastes 'Special, Values', this will give you a date that stays the same.
Remember to format the destination cell as Date before pasting.
BCB

"shaqil" wrote:

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.worksheet.functions
external usenet poster
 
Posts: 698
Default QUERY FOR TODAY RECORDS

Try the SQL DATE() function. Typically that function returns the current
date to a query:

Example:
SELECT `Sheet1$`.date, `Sheet1$`.party, `Sheet1$`.amount
FROM `C:\tmp.xls`.`Sheet1$` `Sheet1$`
WHERE (`Sheet1$`.date=DATE())

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"shaqil" wrote:

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


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

On Apr 26, 4:00 am, Ron Coderre
wrote:
Try the SQL DATE() function. Typically that function returns the current
date to a query:

Example:
SELECT `Sheet1$`.date, `Sheet1$`.party, `Sheet1$`.amount
FROM `C:\tmp.xls`.`Sheet1$` `Sheet1$`
WHERE (`Sheet1$`.date=DATE())

Does that help?
***********
Regards,
Ron

XL2002, WinXP

"shaqil" wrote:
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


Thanks a lot Mr Ron, ur SQL is working.

U did the same job that Ron did for Harry in Harry potter & Sorcerer's
Stone.

Thnk U Very Much.

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
IF TODAY equals date in cell A10, or if TODAY is beyond that date SoupNazi Excel Worksheet Functions 4 April 23rd 07 01:14 AM
Keep cell data with records from a query Secret Squirrel Excel Discussion (Misc queries) 2 January 26th 07 10:46 PM
Keeping cell data with records from a query Secret Squirrel Excel Discussion (Misc queries) 0 January 23rd 07 05:41 PM
Using "today" in an XLS Query JTurner Excel Discussion (Misc queries) 3 July 17th 06 03:25 PM
=IF(OR(TODAY()G9),"Pass","Overdue") Why doe it not wo. Fkor Excel Discussion (Misc queries) 3 March 10th 05 08:29 AM


All times are GMT +1. The time now is 06:30 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"