Hello, hello everyone, today with you a summary of 13 often used in the work of the date and time function use methods, learn them can solve almost all the work encountered in the work, about the date and time extraction and conversion problems. Without further ado, let's get started
<h1>First, understand the nature of time and date</h1>
When we encounter problems such as calculating the difference in time or date, many people feel that there is no way to start, do not know how to do, in fact, time and date is essentially a numeric value, as shown in the following figure, time or date change to a regular format will become a numeric value, change to the corresponding format will become a time or date display, here need to pay attention to: time is a value between 0 and 1, only by understanding these we can understand the time and date function faster

<h1>Second, the time function</h1>
1. Time function
Time: Generates a specified time
Syntax = time (hours, minutes, seconds)
It is important to note here that the number of hours is an integer between 0 and 23, and the number of minutes and seconds is an integer between 0 and 59
2.HOUR function
Hour: The number of hours in the extraction time
Syntax = hour
3. MINUTE function
Minute: The number of minutes in the extraction time
Syntax = minute
4. Second function
Second: The number of seconds in the extraction time
Syntax = second (time)
The above are the 4 time functions often used in work, so how to calculate when we want to ask how many minutes of time difference between the two times? First we subtract the two times, then use the hour function to extract the number of hours in the difference multiplied by 60, and then use the minute function to extract the number of minutes, add the two together and finally change the format to the regular format, and so on, the problem of time addition and subtraction is calculated in this way
<h1>Second, the time class function</h1>
1.TODAY function
Today: Gets the date of the day.
Syntax = today()
This function has no parameters, directly enter the function name, fill in the parentheses, and click Enter. Functions get the date on your computer, and to be correct you need to make sure that the date on your computer is correct
2. NOW function
Now: Get the current moment,
Syntax: =now()
This function also has no arguments, it generates a date plus time, the rest is the same as the today function
3. DATE function
Date: Generates a specified date
Syntax: date= (year, month, number of days)
4.YEAR function
Year: Gets the year in the date
Syntax: =year (date)
5. MONTH function
Month: Gets the month in the date
Syntax: =month (date)
6. DAY function
Day: Gets the number of days in the date
Syntax: =day (date)
7. EOMONTH function
Eomonth: Returns the date of the last day before or after the specified month
Syntax: =eomonth (date, number of months before and after)
If the target is set to January 2, 2021 as expected, when the second parameter is 0, it returns the last day of the month, if it is 1, it returns the last day of February, if it is 2, it returns the last day of March, and so on
8. WEEKDAY function
Weekday function: Returns the number corresponding to the week of the week based on the date
Syntax: =weekday (date, parameter type)
There are many types of inputs for his second argument, usually setting his second argument to 2, so that week 1 returns the number 1 and Sunday returns the number 7
9. DATEDIF function
Datedif: Calculates the difference between two dates
Syntax: =datedif (start date, end date, calculation type)
This function is a hidden function in Excel, and its result will take an integer. The third parameter is a total of 6 for specifying the calculation type, as shown below
Y: Calculates the difference between the years
M: Calculate the difference between months
D: Calculates the difference in days
MD: Calculates the number of days between months. Months and years in the date are ignored
YD: Calculates the number of days apart in the same year. The year in the date is ignored
YM: Calculates the number of months between months. The year in the date is ignored
The above is a function of the 13 times and dates shared today, how about it? Have you learned?
I'm Excel from zero to one, follow me and keep sharing more Excel tips
(Circle cards have been added here, please check out the today's headlines client)