Horje
Year() Function in MS Access

Year() : Function in Microsoft Access is used to return the year part of a given date.

Syntax :

Year (date)

Parameter : This method accepts one parameter as mentioned above and described below :

  • date : It is any variant, numeric expression, string expression, or any combination of these that can represent a date.

Returns : It Returns the year part of a specified date . If date contains Null, Null is returned.

Example-1 : Find Year from a specified Date :

SELECT Year(#05/17/2017#);

Output :

2017 

Example-2 : Find Year part of Today :

SELECT Year(Date());

Output :

2020

Example-3 : Find Year of Joining of the Employee :

SELECT Year(JoiningDate) FROM Employees;

Output :

1990
2004
1992

Note : There Should be JoiningDate column in Employees Database.Here, the Employees Database contains only 3 records.




Reffered: https://www.geeksforgeeks.org


SQL

Related
Sequence with examples in SQL Server Sequence with examples in SQL Server
Month() and Minute() Function in MS Access Month() and Minute() Function in MS Access
MonthName() and Now() function in MS Access MonthName() and Now() function in MS Access
Orphan User in SQL Server Orphan User in SQL Server
Update Action in MS SQL Server Update Action in MS SQL Server

Type:
Geek
Category:
Coding
Sub Category:
Tutorial
Uploaded by:
Admin
Views:
11