Date functions in Excel, DAY, WEEKDAY, MONTH
Date functions in Excel such as TODAY, YEAR and MONTH are assistants to help you calculate and manage time effectively. Below, Free Download will introduce some popular functions with simple, easy-to-understand examples.
Date function in Excel, calculation formula
Date functions in Excel
1. TODAY function
- Syntax: =TODAY()
- Function: Returns the current date.
For example, if today's date is 11/26/2024, the formula =TODAY() will display 11/26/2024.
2. DAY function
- Syntax: =DAY( Serial_number). In which: Serial_number is a required value. It is the value of day, month, year.
- Function: Separates the date value in a specific date, month, and year cluster. The date is returned as an integer, with values from 1 to 31.
For example: For November 26, 2024, the formula =DAY("November 26, 2024") will return 26.
In the data table below, 11/26/2024 is in cell A2, you can separate the date in cell A2, with the formula =DAY(A2).
3. MONTH function
- Syntax: =MONTH( Serial_number) . Where: Serial_number is a required value. It is the day value of the month you want to find.
- Function: Separates the month value in a specific date. The month is returned as an integer, with values from 1 to 12.
For example, for November 25, 2024, the formula =MONTH("November 25, 2024") will return 11.
4. YEAR function
- Syntax: =YEAR(serial_number) . In which: Serial_number is required, the day of the year you want to find. The date you should enter using the Date function.
- Function: Get the year from a day/month/year value.
For example: For the date 11/25/2024, the formula =YEAR("11/25/2024") will return 2024.
5. DATE function
- Syntax: =DATE( year; month; day) . In which: Year, month, day : are the year, month, day to be entered respectively.
- Function: Returns the entered date, month, and year expression
For example: =DATE(2024; 11; 25) will return 11/25/2024.
6. NOW function
- Syntax: =NOW()
- Function: Returns the current system date and time
7. Hour function
- Syntax: = HOUR(Serial-number) . Where: Serial number is a required argument, which is the time you want to convert to hours. It can be in text, decimal, or in other functions.
- Function: Returns the hour of a time value. The returned hour is an integer in the range 0 to 23.
8. MINUTE function
- Syntax: = MINUTE(serial-number) .In which: Serial-number: Required. Value to be converted to minutes
- Function: Converts a time value to a minute in an hour minute second expression. Minutes are returned as an integer in the range 0 to 59.
9. SECOND function
- Syntax: =SECOND (serial_number)
Where: Serial_number is required. Is the time containing the number of seconds you want to find. Can be a time value or a decimal value
- Function: Returns the second part of the time value. Has an integer in the range from 0 to 59.
10. WEEKDAY function
- Syntax: =WEEKDAY(serial_number; [return_type])
- In which:
+ serial_number: Date expression or a number indicating the date value
+ return_type: Select the return result type
+ return_type = 1 (default): Sunday is 1 (Saturday is 7)
+ return_type = 2: Monday is 1 (Sunday is 7)
+ return_type = 3: Monday is 0 (Sunday is 6)
- Function: Shows the serial number of the day of the week
For example: In cell A2 containing data on November 26, 2024, the formula =WEEKDAY(A2) will return 3 (Tuesday).
Instructions on how to use date functions in Excel
11. WEEKNUM function
- Syntax: WEEKDAY(serial_number; [return_type])
In which:
+ Serial_number: The day of the week entered. This value is required
+ Return_type: Specifies which day is the starting day of the week. Default is 1.
Return_type=1 . The first day of the week is Sunday.
Return_type=2 . The first day of the week is Monday.
12. Days360 function
- Syntax: DAYS360( start_date; end_date; [method])
- In which:
+ Start_date, end_date: are the start and end dates that you want to know the number of days between these two dates. This value is required
+ Method: logical value that determines whether to use the US or European method. Method=false is the US method, method=true is the European method.
- Function: Calculate the number of days between two dates based on a year having 360 days.
13. DateValue function
- Syntax: DATEVALUE(date_text) . In which: date_text: Text string to be converted, limited to the range from 01/01/1900 to 31/12/9999, the input value must be in brackets.
- Function: Converts a date string into a date value for calculation.
14. EDATE function
- Syntax: EDATE(start_date; months)
- In which:
+ start_date: Date used as a reference point for calculation.
+ months: Number of months before or after the reference point used for calculation
- Function: Returns a date calculated from a given reference point and a specified number of months away from this reference point.
15. Networkdays function
- Syntax: NETWORKDAYS( start_date; end_date; [holiday])
- Where
+ Start_date: Start date. Required parameter
+ End_date: End date. Required parameter.
+ Holiday: Number of days to exclude from the work schedule. Optional parameter.
- Function: Returns the number of working days from the start date to the end date, it does not include weekends and holidays that have been specified.
For example: To calculate the number of working days from November 1, 2024 to November 25, 2024, the formula is =NETWORKDAYS("November 1, 2024"; "November 26, 2024")
16. Eomonth function
- Syntax: EOMONTH(start_date; months)
- In which:
+ start_date: Date used as a reference point for calculation.
+ months: Number of months before or after the start_date time point.
- Function: Calculate the last day of any month with the specified number of months.
Above, Free Download has compiled the most popular date functions in Excel , you can refer to and apply them to your calculation work.
You should read it
- Complete financial functions in Excel you should know
- MS Excel - Lesson 5: Excel formulas and functions
- Summary of information functions in Excel
- Comparison functions in Excel - How to use comparison functions and examples using comparison functions
- Date time functions in Excel
- 10 EXCEL functions that ACCOUNTERS often use
- The 10 most useful but often forgotten functions in excel
- Logical functions (logical) in Excel
May be interested
- Summary of trigonometric functions in Excelradians trigonometric functions, degrees, cos, ... in excel will help users to calculate quickly, compared to manual methods.
- MONTH function - The function converts a serial number into a month in Excelmonth function: function performs month value separation in a specific date time month. the return month value is an integer between 1 and 12.
- How to fix the date #VALUE error in Excelwhen entering a date-related formula in excel, some people are reported with the #value error, affecting the results in excel files.
- How to fix date errors when copying to another Excel filewhen you copy the date to another excel file or change the date, it is 4 years and 1 day slower than the date in the file. so how to fix the error of displaying the wrong date when copying in excel?
- Excel date function - Usage and examplesthe date counting function in excel is one of the most effective functions of this software. because excel usually works in the field of statistics and calculations, it is extremely necessary to record dates. to help you understand this function, let's come to the following article of tipsmake.
- How to fix the SUM function doesn't add up in Excelin the process of summing with sum in excel, you will encounter some errors such as not jumping the number, not adding the sum. so how to handle this problem?
- Function handles DATE / TIME in SQL - Part 2this article will show you in detail how to use all functions to handle date / time in sql with syntax and specific examples to make it easier to visualize and capture functions.
- Quickly insert current date and time into a cell in Excelin excel, you can quickly fill out current date, month, and time information as static or dynamic values. the static value is the date and time value at the time of filling without automatically updating on subsequent days when you open or perform calculations on a spreadsheet.
- DAY function - The function returns the date value of a specific date in Excelthe day function: the function returns a date value in a specific date, month, and year format in excel. syntax: day (serial_number)
- How to fix reverse date errors in Excelthe dates are reversed in excel, the month before the next day makes vietnamese users feel strange and unfamiliar. strictly speaking, this is not an error but due to the different ways of writing foreign and vietnamese dates. to correct this you can follow the instructions below of tipsmake.vn.