To enter a date in Excel, use the characters “/” or “-“. To enter a time, use “:” (colon). You can enter date and time in one cell.
Note: The figures in this article show dates in the format of the United States and a number of other countries, where months come first, and then days. The format type depends on your Windows regional settings. You can get more information about date and time formats here.
YEAR, MONTH, DAY
To get the year of a date use the function YEAR (YEAR):
=ГОД(A1)
=YEAR(A1)
Note: Use features MONTH (MONTH) и DAY (DAY) to get the month and day of the date.
DATE function
- To add multiple days to a date, use the following formula:
- To add years, months and/or days, use the function DATE (DATE):
=ДАТА(ГОД(A1)+4;МЕСЯЦ(A1)+2;ДЕНЬ(A1)+9)
=DATE(YEAR(A1)+4,MONTH(A1)+2,DAY(A1)+9)
Note: Function DATE (DATE) takes three arguments: year, month, and day. Excel knows that 6+2=8 is August. As you know, there are 31 days in August, so the program moves on to the next month (August 23 + 9 days = September 1).
Current date and time
To get the current date and time use the function The TDATA (NOW):
=ТДАТА()
=NOW()
Note: Use the function TODAY (TODAY) to get only the current date. To get only the current time, use the following formula (don’t forget to apply the time format to the cell):
=ТДАТА()-СЕГОДНЯ()
=NOW()-TODAY()
HOUR, MINUTES, SECONDS
To return the clock, use the function TIME (HOUR):
=ЧАС(A1)
=HOUR(A1)
Note: Use features MINUTES (MINUTE) and SECONDS (SECOND) to return minutes and seconds respectively.
TIME function
To add hours, minutes and/or seconds, use the function TIME (TIME):
=ВРЕМЯ(ЧАС(A1)+2;МИНУТЫ(A1)+10;СЕКУНДЫ(A1)+70)
=TIME(HOUR(A1)+2,MINUTE(A1)+10,SECOND(A1)+70)
Note: Excel will add 2 hours, 10+1 = 11 minutes and 70-60 = 10 seconds.