...

/

Question: Extract a Value From a Date

Question: Extract a Value From a Date

Learn how to extract the year from a date using SQL query.

Question

Given the following EmployeesDetails table structure:

EmployeeDetails

EmpID

JobTitle

Country

DateOfJoining

1

Software Engineer

USA

2020-04-13

2

Data Analyst

Germany

2019-08-30

3

Content Writer

Holland

2024-02-29

4

Marketing Manager

Canada

2023-02-28

5

Software Engineer

USA

NULL

...