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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Returning year as a number

Status
Not open for further replies.

NeilT123

Technical User
Joined
Jan 6, 2005
Messages
302
Location
GB
I have a query as follows
Code:
SELECT tblSoilAnalysisResults.FieldCode, tblSoilAnalysisResults.AnalysisNumber, tblSoilAnalysisResults.UseResinNutBal, tblSoilAnalysisResults.DateOfAnalysis, Year([DateOfAnalysis]) AS [Year]
FROM tblSoilAnalysisResults
WHERE (((tblSoilAnalysisResults.UseResinNutBal)=Yes));
and I need the "Year" to be a number so that I can do simple sums on it so for example when the answer is 2005 and I add 1 it gives 2006. I can get Year to look like a number but not act like a number. Can anyone help please?
 
Hey Neil,

Cint function can prolly help buddy, look it up. Also consider the dateadd function. Both have ample info in the help file.

Hope this helps mate,

JB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top