Show difference between 2 time stamps in seconds and 1/10ths of a second - google-sheets

I'm looking for a formula to show the time in seconds and 1/10ths of a second between two time stamped cells (produced using CTRL+SHIFT+:) in a Google sheet. The max time between the cells will be less than 1 hour. To make it easy for people to understand it needs to be in the format 123.4 for 123 seconds and 4 tenths. Could anyone help please

You can just subtract the two times and show the result with a custom format of
[ss].0

Related

How can I set a cell to highlight after X hours have passed in Google Sheets

I have a Google Sheet where a column is filled with times in a 24 hour format (XX:xx), how can I select a cell to highlight red after 3 hours have passed with conditional formatting?
I've been trying to mess with the Now() command in custom formulas for like 2 hours now, but I can't seem to get it to work. PLZ HELP!
To Highlight cells if exactly 3 hours 03:00:00.000 have been passed you need to paste this formula in format>conditional formating. > format cell if - Custom Formula, take a look at the example in this sheet.
=ArrayFormula(IF(A3:A="",,IF(A3:A-NOW()>0.13,"True","False") ))
A3:A-NOW()>0.13 to check if the date in the range A3:A minus NOW() is greater than 0.13 which represent an hour 03:00:00.000 as a number.
To check and highlight cells when certain duration have been passed and be able to adjust the duration from a cell you need to paste this formula in cell B2 to get True or False output.
=ArrayFormula(IF(A2:A="",,IF(A2:A-NOW()>$E$2,"True","False")))
It can be used as a formula in format>conditional formating.
take a look at the example in this sheet.
the columns highlighted in blue is for demonstration it can be deleted.
For anyone who has the same issue, it has been solved. Looks like the Now() call requires both the time and date to be inside the cell in order to work.
The formula I used to highlight cells that are older than 3 hours is
=(Now()-TIME(3,0,0))
A friend also showed me a different formula that seems to do the same thing
=IF(NOW()>A2+3/24,TRUE(),FALSE())
You can change the time by changing the (3,0,0) to Hrs,Min,Sec of your choosing, for the second formula, you can change it by adjusting the fraction value (3/24 for 3 hours, etc)
These will only work if you have the date and time in the cells you are formatting (e.g. If you timestamp with Ctrl+Alt+Shift+;) it will not work if you timestamp with just the time (Ctrl+Alt+Shift) as that seems to set the year to 1899 for some reason.
It would be nice if I could get these working without a date, but I have not found a way to do that.

Google Sheets: Rounding DateTime Cell to Nearest 15 Mintutes

Is there a formula that I could use to round a date time cell up or down (1/10/2022 15:17:02) to the nearest 15 minute interval? I've tried MROUND but since the date time field is in a weird format, I can't quite figure out how to get that to work.
Seems to work for me, example here:
https://docs.google.com/spreadsheets/d/1Hq2pep92vmPQ8kPiThNUod7nsFZopMuOAFNcLCdkJcM/edit?usp=sharing
Using =mround(A2,"00:15") to round, =floor(A2,"00:15") to round down, and =ceiling(A2,"00:15") to round up.
Perhaps you forgot to format the end result back as a Date Time itself?
See more examples here: https://infoinspired.com/google-docs/spreadsheet/round-round-up-round-down-hour-minute-second-in-google-sheets/
you can use round to round down
=round(a1*96)/96
or ceiling to round up
=ceiling(a1*96)/96
with date time fields in Sheets the date is treated like a whole number and the time like a fractional part.
so if you want to round to 15 mins - there are 24 * 4 = 96 lots of 15 minutes in one day. so multiply the date by 96, then round, then divide by 96 should do the trick.

Round down to nearest quarter hour

I have a timesheet which I use for billing clients. It records entries from Toggl as hour fractions, ie 35 minutes is recorded as 0.58. I want to round this number down to the nearest 0.25, ie. the nearest quarter hour. Is this possible in Google Sheets?
After a bit more reading, the function I was looking for is MROUND, to round to the nearest given fraction. eg.
=MROUND(A1,0.25)
The crucial step required is to add or substract half a step depending on whether you want it round up or down, eg.
Up: =MROUND(A1+0.125;0.25)
Down: =MROUND(A1-0.125;0.25)
Added screenshots for clarity:
After many tries with ROUND and MROUND I could only get it to work with FLOOR (rounds down) and CEILING (rounds up).
The following example rounds down to the nearest half hour:
=FLOOR(A1, 1/96)
1/24 for an hour, 1/48 for half an hour etc.
The last thing to do is change the Format of the field to time to get a proper time format:
00:00:00

High Stocks. Multi XAxis --- Month wise data not align with big amount of Data Points

I was using these multipliers to display months and it actually works fine if I have less points but once I have a more points its just messed up the whole chart..Here is what happened I have 2 X-Axis 1) to display just dates while the other one which is opposite to that x-axis displays Month with Year. This is their requirement so I cant change.
Days wise I use to every other 3 days using (3*24*3600*1000) interval so it work but when I use (30 * 24 * 3600 * 1000) to display months it creates a mess. So let say I have March data point if I see bottom xaxis it looks fine but the month one is way off
I have tried almost all the possible solutions but nothing works out. Any Quick Help will be highly appreciable

Highcharts x-axis data is 3 hours apart with "Now" start point, but want full day with 0:00 start time

just started playing with the Highcharts API and it is very impressive with lots of great documentation and demos! I am getting weather data at 3 hour intervals for five days and it works fine, but the x-axis is cluttered. I would like to make the x-axis full days regardless of the start time of the data with vertical alternateGridColor for each day.
This demo seems to be a solution, but I cannot get it to work on my data:
http://www.highcharts.com/ref/show/gh/get/jquery/1.7.1/highslide-software/highcharts.com/tree/master/samples/stock/plotoptions/pointinterval-pointstart/
The demo has one series, I have four. Not sure if that is the issue.
Or I thought of "padding" the data array so it always started at 0:00 of the current day and ended at 24:00 of the fifth day.

Resources