99 votes
Accepted

How do I calculate a time delta in my Google Spreadsheets?

Google has added a new number format called Duration. Start by formatting the start and end fields to Format -> Number -> DateTime or Format -> Number -> Time and your calculation field ...
user avatar
  • 1,114
39 votes
Accepted

How to convert Unix Timestamp to human readable?

I prefer a formula that is more transparent, with fewer magic numbers. It makes it easier to see what's going on and also avoids the likelihood of having a bug (like the current top answer to this ...
user avatar
  • 546
31 votes

How to Fill a Column with Sequential Dates in Google Sheets

As it was already pointed out in other answers, you have to select at least two cells containing successive dates. However, this didn't work for me at first because my Google Sheet had the wrong ...
user avatar
29 votes
Accepted

Conditionally format by day of the week

I had been struggling with this for a long time, but finally cracked it: Use conditional formatting on the column with the dates and type the following as a custom formula: =or(WEEKDAY(A1)=1,WEEKDAY(...
user avatar
  • 306
17 votes

Conditionally format by day of the week

Easy (but a bit tedious!) in new Google Sheets. For Conditional Formatting a new rule is required for each colour, roughly. (One colour can usually be skipped from rules and instead applied with ...
user avatar
  • 16.7k
16 votes
Accepted

Change date format [YYYYMMDD] to [MM/DD/YYYY]

Assuming your string is in cell A1, this formula will convert it to a date. You can then format the date however you prefer. =date(left(A1,4),mid(A1,5,2),right(A1,2)) Or, take the leftmost four ...
user avatar
  • 51k
15 votes

Compare date value to current date in Google Sheets

Short answer Assuming that you want to compare a date in the cell A1 with the current date, use the following formula: =A1>TODAY() The above will return TRUE if the value of the cell A1 is the ...
user avatar
  • 41.8k
13 votes

How to add days to a date

Here's another way to add days to a date that builds on the previous answer. Let's say you have this in Cell A1 DATE(2010, 12, 01) You can add 5 days to it in Cell A2 using the DATEVALUE command ...
user avatar
  • 131
11 votes
Accepted

Year function in Google Sheets gives unexpected results

The reason is that column is also formatted as a date. Format it as a number and you'll get what you're after. Google Sheets stores dates as a number of days from 12/31/1899. Your YEAR() is ...
user avatar
  • 51k
9 votes

How do I calculate a time delta in my Google Spreadsheets?

So much simpler: look at this answer from Excel Forum: B2: 23:00 C2: 1:37 D2: =C2-B2+(B2>C2) Why it works, time is a fraction of a day, the comparison B2>C2 returns True (1) or False (0), if ...
user avatar
9 votes

How do I calculate a time delta in my Google Spreadsheets?

I've done a lot of experimentation. This is the easiest way to calculate a time delta in Google Spreadsheets. Format the cell containing the formula like this: Format > Number > More Formats > More ...
user avatar
9 votes

How to Fill a Column with Sequential Dates in Google Sheets

The next level would be to use ARRAYFORMULA: =ARRAYFORMULA(TEXT(ROW(INDIRECT("A"&DATEVALUE("2018-4-13")& ":A"&DATEVALUE("2018-4-30"))), "dd/mm/yyyy"))
user avatar
  • 24.6k
9 votes
Accepted

Date and time format

I use this formula to convert the date time values IFTTT spits out to a useful format: =VALUE(SUBSTITUTE(A1, " at ", " ")) Where A1 is the cell containing the date string This gives you a decimal ...
user avatar
  • 206
7 votes
Accepted

Calculate days between now and a future date

There are two possible options for you to consider. Formula "28/06/2015"-TODAY()) DATEDIF(TODAY(), "28/06/2015", "D") Todays date is: 28/10/2014. The result will be an integer (243). Note Make ...
user avatar
7 votes
Accepted

Convert Text String into Date/Time Value

={DATE(RIGHT(A1, 4), MONTH(MID(A1, 5, 3)&1), REGEXEXTRACT(A1, "\d+")), TEXT(INDEX(SPLIT(A1, " "), 1, 4), "hh:mm:ss")} with timezone in account: ={DATE(RIGHT(A1, 4), MONTH(MID(A1, 5, 3)&1), ...
user avatar
  • 24.6k
6 votes

Conditionally format by day of the week

If the dates are in column A, select them, then do: Format > Conditional formatting... > Format cells if... > Custom formula and put =and(isblank(A:A)=false, or(weekday(A:A)=1, weekday(A:A)=7)) Some ...
user avatar
6 votes

Using Google Sheets, how can I calculate the average per month based on multiple rows?

I'm guessing you basically want to sum up the expenses for each month, and then find an average amount per month. Let's first sum up expenses for each month. Each row in your spreadsheet has a date, ...
user avatar
6 votes
Accepted

Time tracking with Google Spreadsheets

I made a simple version of your problem you can play around with: Make a copy of the sheet There are basically two things to do: 1. Get the duration for each visit For that I added a Column with an ...
user avatar
5 votes

How do I calculate a time delta in my Google Spreadsheets?

Disclaimer: I am posting this answer that doesn't exactly answer the asker's question because this is the answer I needed when this question was the first result on Google, and I want to help the next ...
user avatar
  • 69
5 votes

Change date format [YYYYMMDD] to [MM/DD/YYYY]

If you want a proper date (recommended) please try: =date(left(C2,4),mid(C2,5,2),right(C2,2)) Custom Format as Number mm/dd/yyyy to show leading 0s. If you want a text string to include ...
user avatar
  • 16.7k
5 votes

How to convert Unix Timestamp to human readable?

The result was one day ahead for me, so I changed it to =to_date((A1+2209161600)/86400)
user avatar
  • 51
5 votes
Accepted

How to increment dates by exactly one month from a given date in Google Sheets

The formula you can use to increment dates by exactly one month from a given date is: =ArrayFormula(EDATE(E7,SEQUENCE(14,1,1,1))) Functions used: ArrayFormula EDATE SEQUENCE
user avatar
  • 11.7k
5 votes
Accepted

Print incremental numbers in Google Sheets

It is as simple as using the following sequence formula =SEQUENCE(A1) Or you even could have something like this: =SEQUENCE(A2,1,A4,A6) You could even use the SEQUENCE function for dates =...
user avatar
  • 11.7k
4 votes

How to add days to a date

The way I do it is: place the date in row A1, in row A2 using the formula do = A1 + [number of Days] Eg.: A1 [11/12/2018] A2 [=A1+3] A2 [November/15/2018] (I format the date with an easy to ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible