how to format time in fusion table - google-fusion-tables

I have a fusion table with the following in my Time Column. basically time entered in hh:mm:ss format. I have a am/pm column with the following formula and it is not working:
if ('Time' > '12:00:00', 'pm', 'am')
I am getting all **** instead of pm or am. What am i doing wrong?

Sorry at present it's not possible, have a look at the following two links:
Google Fusion Table Formula
https://code.google.com/p/fusion-tables/issues/detail?id=235

Related

How to generate sequences in Google Sheets

I'l like to create a sequence of dates using "sequence formula" with a start and end date. I mean, something like this:
start date = 2020-01-01
end date = 2022-12-01
I just also want to bring the first day of the month, like the following example:
2020-01-01
2020-02-01
2020-03-01
......
2022-10-01
2022-11-01
2022-12-01
How can I get this? Is there another way to do it?
Thanks!!!
There are several ways to approach this. Here is one I recommend:
=ArrayFormula(DATE(2020,SEQUENCE(DATEDIF("2020-01-01", "2022-12-01", "m")+1),1))
You'll replace the first 2020 with the year of your starting date and the next two string-dates with your full start and end date. That's it.
Just make sure you leave enough cells open below this formula to accommodate the number of dates you're requiring the formula to output.
Format the output range in the date format you prefer (Format > Number...).
Simple SEQUENCE() should work. Try-
=SEQUENCE((B1-A1)+1,1,A1)

Switch date and month google sheet

I have a data column which date in this format 05/12/2021 = dd/mm/yyyy but google sheet see it as 05/12/2021 = mm/dd/yyyy, how can I use a formula to switch the day and month around and display as 5/12/2021 = d/mm/yyyy. It has to be done on a formula level as there are many other dates column that has the format and information right.
Formula tried
=TEXT(A3:A,"d/mm/yyyy")
If the date is entered correctly, you should be able to format it by going to the 'Format' menu.
However, if you need to transpose the formatted day and month using formula, then try this in row 3 (any column but A):
=arrayformula(datevalue(regexreplace(to_text(A3:A),"(.|..)[\/\-\.](.|..)[\/\-\.](.*)","$2\/$1\/$3")))

Match date in two cells with conditional formatting, +/- 3 days.. Google sheets

I am making a deadline sheet for office.
I have made a conditional format that compares the dates with our "office are closed"-dates provided by our HR-department. If the delivery date match any of the "office closed"-dates in the next column it will be coloured red.
This works fine, but I just noticed one thing. If the date where 1 day before the holidays, and the holidays would be many days a row starting next day, we wouldn't see that and we would probably get big trouble manage Finnish these masters before deadline as we are not at office for a few days.
So, I thought, maybe I could add to the script something that says: "compare the dates in this column with the dates in "Office Closed"-column, if there is a match within a range of 5 days, color it red...?
Is this something I can do?
here is a screenshot of the sheet.
This is the code I use in Conditional Formatting now:
=COUNTIF($L$4:$L$25,H6)>0 which works fine.
Thanks for any help!
/Andreas
Use following formula in CF:
=IF(LEN(A2),SUMPRODUCT((($C$2:$C+3)>=A2)*(($C$2:$C-3)<=A2)))

How do I pull the month from text strings in this Twilio format 2019-08-22 06:12:58 MDT?

I am using the Twilio log file to crunch some data and need to convert the Twilio format for dates into something that Google Sheets can recognize as a date so I can then extract what month the date is referring to. I think that first, the text string has to be converted to be a better format and then I can use one of Google Sheets functions to extra the month. Currently, this is the format in the log file:
"2019-08-22 06:12:58 MDT"
I used GoogleSheets TIMEVALUE and TEXT functions.
=TIMEVALUE(I2)
and
=text(I2,”mmmm”)
I get "Formula Parse Error"
The timezone stamp is messing up the Google formulas for you.
So you may want to try getting rid of that with something like this:
=text(index(split(I2," "),,1),"mmmm")
The split function breaks up the logged time stamp into 2019-08-22 | 06:12:58 | MDT across three columns.
And the index function then gets the just the first column - the date bit from there.
And then the text function gets the month name out of the date.
you can use:
=TEXT(LEFT(A1, 10), "mmmm")
and in array it would be:
=ARRAYFORMULA(TEXT(LEFT(A1:A, 10), "mmmm"))

Google Data Studio - datetime shows only date

I have a Google Sheet containing datetime and present it like this: 10/28/2018 1:00:00
In Google Data Studio, my column is set to Date (YYYYMMDD) but all I see in the table is the date without the time.
How could I show the date and the time together?
Can you just change the format of the data to
Date Hour (YYYYMMDDHH)
?

Resources