Year#
Description:
Returns the year of a given date.
Function:
Year(table = string, col = string, new_col = string)
Parameters:
Table: Table name on which to perform the function
Date Column: Column containing the date for which the year will be extracted
New Column Name: Name for the new column to store the year
Example:
Year(table = Budget, col = "Date", new_col = "Year")
Date |
Geo - BU |
Plan |
Actual |
|---|---|---|---|
8/22/2023 16:14:14 |
Middle East & Africa - Healthcare |
1200 |
900 |
9/1/2022 12:34:44 |
Middle East & Africa - Energy |
1150 |
1000 |
8/31/2022 14:03:34 |
Latin America - Energy |
2000 |
1800 |
2/22/2023 7:05:05 |
Latin America - Energy |
1850 |
2000 |
2/5/2024 6:59:59 |
Latin America - Energy |
900 |
900 |
7/26/2024 22:47:47 |
Latin America - Energy |
1050 |
1100 |
10/8/2024 22:50:50 |
Asia-Pacific - Energy |
1500 |
1300 |
6/20/2024 9:45:30 |
Asia-Pacific - Energy |
1700 |
1400 |
9/23/2024 8:38:38 |
Asia-Pacific - Technology |
800 |
750 |
8/2/2024 18:18:18 |
Asia-Pacific - Technology |
950 |
1050 |
Date |
Geo - BU |
Plan |
Actual |
Year |
|---|---|---|---|---|
8/22/2023 16:14:14 |
Middle East & Africa - Healthcare |
1200 |
900 |
2023 |
9/1/2022 12:34:44 |
Middle East & Africa - Energy |
1150 |
1000 |
2022 |
8/31/2022 14:03:34 |
Latin America - Energy |
2000 |
1800 |
2022 |
2/22/2023 7:05:05 |
Latin America - Energy |
1850 |
2000 |
2023 |
2/5/2024 6:59:59 |
Latin America - Energy |
900 |
900 |
2024 |
7/26/2024 22:47:47 |
Latin America - Energy |
1050 |
1100 |
2024 |
10/8/2024 22:50:50 |
Asia-Pacific - Energy |
1500 |
1300 |
2024 |
6/20/2024 9:45:30 |
Asia-Pacific - Energy |
1700 |
1400 |
2024 |
9/23/2024 8:38:38 |
Asia-Pacific - Technology |
800 |
750 |
2024 |
8/2/2024 18:18:18 |
Asia-Pacific - Technology |
950 |
1050 |
2024 |