
If we want to find the difference between two days, we should use the DATEDIF() function.

By combining all those values, it will convert the date of string format to date format. In place of date, we used LEFT(A1,2), which means from the Left end two values which are 10. For example, we need from the 3 rd position and two values hence given 3 and 2. We used MID(A1,3,2) in the month’s place, which means, in cell A1 from which position and how many values we need. We used RIGHT(A1,4) in place of the year, which means, in cell A1, consider the data from the right end to 4 positions nothing but 2019. I used 3 functions right(), mid () and left(). Observe the formula in the above screenshot. With the help of the Date() function, we can also change the format from 10022019 to or. Sometimes people may give the date in the format like 10022019, which they mean. This is how we can perform addition and subtraction. Observe the screenshot above we have subtracted 15 from the Date function because of which month has changed from 9 th to 8 th month. Now we will subtract 10 days from the Date() function and will check. To observe that clearly, I used the month function also. For example, on the date, the function month is the 9 th month, but after the addition of 45 days, the month became the 10 th month. In the above screenshot, we added 45 to the Date() function, which results in the change in the month and date. We can add the required number of days or subtract the required number of days to the existing date function to obtain calculated results.Ĭonsider a situation that we will receive the cash after 45 days of the invoice date then, we can use this formula to find a cash receipt date. In the above screenshot, the arguments for the year, month and date are given with the cell address of column B. Then, we can refer to the cell address in the formula. Suppose we have details of the required date in different cells, which means a year in one cell, a month in another cell, and another cell. Observe the above screenshot where I did not give the month number but used the function today for month extraction.

Instead of using the month number, we will use the Function Today() to extract the month from that. Similarly, we will do it for a month now. We can refer to the current year and current month using the today function instead of giving the number in the argument. The above number represents the number of days from to the given date.
#Insert current date in excel 2013 serial number#
If we want the serial number for that date to convert the cell to a General format. Examples of Date Formula in Excelįollowing are the different examples: Example #1Ī simple date format can be used as below.

The same logic will apply to the day also. In the below example, we took the year as 2019, but we gave -3 in the month argument hence it reduced 3 months from 2019 return results as the 9 th month of 2018 with the same date. If we give a negative value for the month argument, the function will reduce that number of months from that year and will return results. Using a negative value in the year will return results as #NUM! as below. We can use negative values also in these arguments except for the year.

So, if I give 30 in the date argument, it should result in 2 because 28+2 will result in 30. Consider an example of February, which has 28 days. If we give a number more than 12, it will repeat to give from January again, which means the second month will be February if we give 14, 12+2.ĭate – Similarly, there are also 31 days for a few months and 30 days for a few months depending on the month it will calculate the number given in the date argument and return the results. Month – We already know that there are 12 months.
