Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculate Dates 2

Status
Not open for further replies.

rpangel

Programmer
Jun 12, 2001
29
US
hello everyone,

i was wondering if anyone knew what the reserved word is to get today's date in a SQL statement... i'm trying to write a query that will subtract the current date from yesterday's date without having to manually insert and change the dates. i thought i could use 'date$' but it doesn't work. does any one have any ideas...

TIA (thanks in advance)
angel
 
Look at the DATE() and the NOW() functions in Access help... Terry M. Hoey
th3856@txmail.sbc.com
While I don't mind e-mail messages, please post all questions in these forums for the benefit of all members.
 
i didn't find anything in access help under those words...
 
Terry is rite :)

Ur query should be something like that

Select Date1 , date(), Date1-Date() from mytable;

date() will return todays date.

Hope it works.

Cheers!
Aqif
 
THANK YOU,
You were right all along. I appreciate the help.

 
I need to get the diff between dates EXCLUDING weekends. I need to find out how many business days tasks take.
 
wellskmac,

You might want to start a new thread for this since it is entirely different from the original post. But before that I suggest you look into the keyword search as there have been numerous postings on this subject matter.
good luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top