In Google Sheets, while copy-pasting values only i.e CMD+Shift+V, of Date Time objects, they are pasted as floats e.g
Date Time
paste values only
04/10/2016 23:58:00
42647.9986111111
15/11/2021 23:58:00
44515.9986111111
25/08/2022 23:58:00
44798.9986111111
These values look like Posix time, only in days. Is it right to assume that the Epoch used in Google Sheets is
1899-12-30 00:00:00 UTC ?
If so, why this choice?
You're correct that Google Sheets' epoch is December 30th, 1899. According to an archived Microsoft dev blog, this was due to a bug in Lotus 1-2-3, Excel's predecessor:
And finally, why 30 December 1899? Why not, say, 31 December 1899, or 1 January 1900 as the zero day? Actually, it turns out that this is to work around a bug in Lotus 1-2-3! The details are lost in the mists of time, but apparently Lotus 1-2-3 used this date format but their devs forgot that 1900 was not a leap year. Microsoft fixed this bug by moving day one back one day.
To be compatible with Excel, Google Sheets implemented the same feature.
Related
I already have a graph (time tree) that contains Year, Month, Day, Hour and Minutes. It is something like that of what Mark Needham shows in his blog link but it goes until Minutes instead of days. So the link looks something like this :
2017-[:HAS_MONTH]-2-[:HAS_DAY]-25-[:HAS_HOUR]-16-[:HAS_MINUTE]-45
I also have Year to week number relation. The starting and ending dates of the Workweek are custom. For eg my week 2 in 2017 starts from 2017-01-05 19:00 (yyyy-mm-dd hh:mm) and ends on 2017-01-12 18:59. I have all the nodes between those 2 dates in my time tree but I am not able link them to week 2 node. Is there a way to do this? I am not using graphaware. I managed to do something for this one week by collecting all the days from 5th to 12th and then removing the hours 0 to 18 from 5th and 20th to 23rd on 12. But I need to do this for a couple of years and this method may be very cumbersome. Is there a better way for this?
You can use apoc plugin already :)
apoc.date.format uses JAVA simpledateformat under the hood I think. Looking at http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html this is already possible. But you have to first parse it into unix and then back.
with "2017-01-05 19:00" as date
with apoc.date.parse(date,"s","yyyy-MM-dd HH:mm") as unix
return apoc.date.format(unix,"s","yyyy ww")
I need to schedule reports on monthly basis. The reports need to go out on 1st of each month with data from previous month. For reporting, I have selected the preset date option as 'Last Month' with monthly rolling date option. Right now, it says: Rolling date options: 04/01/2017 (rolling monthly) - 04/30/2017 (rolling monthly) which is how it should be. But I am concerned if it considers the varying number of days in a month (30, 31). Can someone confirm when the next set of reports go out on 6/1, whether the date range would be from 05/01/2017 to 05/30/2017 or 05/31/2017?
If it doesn't consider the number of days in a month, is there an alternative to this setup for achieving the same results?
"Rolling monthly" does just as the name implies. When the date shifts from 4/30 to 5/1, the report will update to April data. When the date shifts from 5/31 to 6/1, the report will update to May data. If on 6/15 you again open the report, it will still be populated with May data, because the month has not yet rolled.
Currently my data in Influx is the following
measurement: revenue_count
field: users
field: revenue #
timestamp: (auto generated by influx)
What i'm looking to do is find a way to get the average revenue for a day in the week. i.e What is the average revenue for Monday, Tuesday etc.
What's the best way to do this in influx?
You should use continuous queries to schedule automated rollups/downsampling and then select the data from these pre-calculated series.
If you don't have too many points, you might not need the CQ's. In that case an on-the-fly group by will most probably be enough.
I wasn't able to find info on whether you can "select all points for a certain day" by just specifying a date. As far as I know, this is currently not possible because if you specify something like time == '2016-02-22 what this will effectively mean is 2016-02-22 00:00:00 (it won't mean give me everything from 22nd Feb 2016).
What you may need to do is specify an interval (two time points) between which you expect your downsampled point to be placed.
InfluxDB has no concept of days of the week. You can get the average revenue per day, where a day is midnight to midnight UTC with the following:
SELECT MEAN(revenue) FROM revenue_count WHERE time > now() - 7d GROUP BY time(1d)
Using Google Spreadsheets, I need to enter data structured like the example below.
There will be multiple "quadrants"
Each "quadrant" can contain one or many "days",
Each "day" can contain one or many "times".
This data will ultimately be imported in some backend db (e.g. Access DB, SQL, MySQL).
Question: For each day, how do I represent multiple times? Do I create a new row?
Quadrant One Team Schedules
Sunday
10:00 AM - Red Team
3:00 PM - Green Team
Monday
6:00 AM - Red Team
10:00 AM - Yellow Team
3:30 PM - Green Team
Tuesday
Wednesday
6:00 PM - Yellow Team
Thursday
1:00 PM - Red Team
Friday
Saturday
10:00 AM - Blue Team
3:00 PM - Red Team
I’m not quite sure what answer you are expecting but wanting to post an image (and probably length!) is why this is not a comment.
Poor data layout that requires changes to help legibility or changes to facilitate further processing is, IMO, a very big issue – much more so than, it seems, is appreciated by novices (see perhaps Kruger-Dunning). Again merely my opinion, but I think about half of all questions on SO have data layout as an issue, in whole or part.
Some suggestions:
With databases, always have an index (ID) to identify unique records (rows). Often added automatically.
Try to ensure each record is complete for every field (nulls may cause issues). ID6 seems not required.
Use dates rather than days of the week (it is easier to get the day from the date than the date from the day!)
(Personal preference – not always viable) Use ‘scientific’ notation for dates (YYYYMMDD) to avoid ambiguity between ‘US’ and ‘UK’ systems – and the difficulties in switching between them.
Use the 24-hour clock (saves the space for AM and PM, reduces ambiguity and generally is easier to process).
Not so important nowadays but should consider codes (with a lookup table if desired) such as YL for Yellow rather than indeterminate length strings – saves on data storage so less cost, more speed win/win.
Can anyone shed light on the following dilemma, please?
I have the need for a custom formula that allows conditional formatting for any rows who's date in columnB is 3 weekdays AHEAD of today's current date.
For example, if today was Wednesday 12/3 then I need to format any rows who's colB date is 3 working days in the future Thus (Monday 12/8) would be formatted....skipping any weekend days. No other days before or after (Monday 12/8) would be formatted.
To explain the premise, Sales staff can view this page and know that all jobs due to be installed 3 days from today (highlighted, say in yellow) must be turned in for processing today. Thus the need to exclude all weekend days.
This forum has helped me so very much to accomplish my Production Schedule using Sheets, as I have zero experience. You guys have been the best and I am in hopes this too can be resolved.
For reference you can view the test data sheet named "DUE_AMBER" at the below link where all rows having date of "Mon, Dec 8" would be only rows impacted
https://docs.google.com/spreadsheets/d/1goG0TS1_2jwlGRetREYNRVk-Q6TEy3iWG_5VXFoZlus/edit?usp=sharing
Thanks.
Seems OP is happy enough with this answer of his own:
=(if(networkdays(TODAY(),(INDIRECT("B"&ROW())))=4,1,0))=1