Your screen prints are two small to read.
Can you post your formula?
And then can you post a data sample that shows the value of the fields used in the formula?
I can't read the error message text completely (but I can see it's a syntax error), or the expression you are using in the query -
please post the query expression.
The query expression I used is: =Datediff("n",[StartTime],[EndTime])
My Fields are named "StartTime" and "EndTime" and are "Date/Time" data type
"My Fields are named "StartTime" and "EndTime" and are "Date/Time" data type"
But they aren't called that. According to the screen shot, they are called TableBegin and TableEnd (I think).
So the query expression should be: =Datediff("n",[TableBegin],[TableEnd])
The "equals" syntax is not a Access Query structure.
You give your calculation an "alias" (or name), like:
Code:Difference: Datediff("n",[StartTime],[EndTime])
JoeM -
That's what I thought too, and when I tried it, A2010 automatically removed the "=" and replaced it with "Expr1:". Very convenient."The "equals" syntax is not a Access Query structure."
Thats something I tried already and somehow I keep getting the same error message.
When I click "Ok" and confirm the error message it underlines the comma, marked in red in the example below.
Difference: Datediff("n",[StartTime],[EndTime])
Attached are some screenshots (in decent quality this time)
![]()
Are you using an American version of Office, a European version, or some other version?
I have seen some versions of Office use semi-colons instead of commas to separate arguments.
Problem solved!! just by replacing the commas in semicolons as JoeM mentioned.
Thanks a lot! (I'm using a European version by the way)