Dates and DATE practice exercises
A date in a spreadsheet is a number of days, so you can subtract dates, add days to them and build them from a year, a month and a day.
- 1Days between two datesIn C2, work out how many days the delivery took. Subtract the order date in A2 from the delivery date in B2.
- 2Add days to get a due datePremiumIn C2, work out the due date of the invoice. Add the payment terms in B2 to the invoice date in A2.
- 3Build a date with DATEPremiumThe year, month and day of a date came from a system in three columns. In D2, use DATE to turn A2, B2 and C2 into one date.
- 4Get the month with MONTHPremiumTo total sales by month you need the month number of each sale. In B2, use MONTH to get it from the date in A2.
- 5Get the quarter from a datePremiumIn B2, find the quarter of the sale date in A2, a number from 1 to 4. Divide the month by 3 and round up: ROUNDUP(MONTH(A2)/3,0).