The time now is 10/29/08 - 20:17
Log in: Username: Password:
Search forums for:
  
 
H-Desk.com Forum Index

H-Desk.com - PC Security matters - Protect your PC privacy


Access 2003 Query Calculation


H-Desk.com Forum Index -> Microsoft Software -> Microsoft Office

Post new topic   Reply to topic
Author Message
jorgan



Joined: 28 Mar 2005
Posts: 65



PostPosted: 08/14/08 - 07:45    Post subject: Reply with quote

I wrote query in Access 2003 that calculates difference between two days and gives result in days. Query looks like this: “DateDiff(“d”,[strCutDate],[Now()])+1”. The problem is that Access asks me to input value for Now(). I do not know why is this happening because Now() is a function that gives current date, right? Do you have solution for my problem with this query?
Back to top

marijn



Joined: 16 Apr 2007
Posts: 3



PostPosted: 09/02/08 - 02:27    Post subject: Reply with quote

Hello. The solution for your problems with Access 2003 query calculation is simple. Your problem is caused by syntax error. Instead if [Now()], which tells Access that this is control and not a function, use Now() (remove []) which represents function. Even better option is to use Date() function because you are not calculating difference between exact time of the day but between whole days. So, your query should look like this: “DateDiff(“d”,[strCutDate],Day())+ 1”
Back to top

Display posts from previous:   
Post new topic   Reply to topic All times are GMT

H-Desk.com Forum Index -> Microsoft Software -> Microsoft Office

Page 1 of 1

Related topics: