Google Docs - Convert date into day of the year - spreadsheet

Task is pretty simple and I know I could calculate it myself but can't believe there is no dedicated function for it in GDocs already.
Today is 2019-11-28 it's 332 day of the year.
How to get that integer in google docs spreadsheet?

You want to retrieve the days between 2 days using Google Spreadsheet.
If my understanding is correct, how about using DAYS() of the built-in function?
Sample formula:
=DAYS("2019/11/28", "2019/01/01")
In this case, when above formula is put to a cell on the Google Spreadsheet, 331 is returned. In your question, If you want to retrieve the result of 332, you think of =DAYS("2019/11/28", "2018/12/31")?
Reference:
DAYS function
If I misunderstood your question and this was not the direction you want, I apologize.

Related

Is there a way to use a variable/combo box to select a year in a date without using date picker

I am working on a calculator to track my (and my coworkers may use it) overtime at work. We have a bunch written in excel, but I am trying to do one in access. There is probably a simple solution, but having searched for a couple days for using a variable in a date has only given me how to use the date as a variable. So our pay periods are defined 1/1/yyyy to 1/15/yyyy etc. Hour pay is calculated on the number of days we have in a pay period which varies every year by days off. I have it calculating the proper number of days using VBA, but I am having difficulty getting it to use the combo box year which defaults to current year.
I have tried setting the control source to = 01/01/[cmbYearselect]
using variables, creating a string in vba and format date
Any help would be appreciated as I am going to have to use the variable in both the control sources and vba code.
Thank you
01/01/[cmbYearSelect] results in 12/30/1899 on my form
everything else has resulted in a type mismatch for the variables etc.
Use CDate with no year:
=CDate(#01/01#)
or:
=CDate("01/01")
to have primo of the current year.

How to convert timestamp to days?

I have my MySQL database inserting timestamp when I upload a record, so what's entered is something like 2020-04-02 16:59:29. Is there a Vue.Js way to convert that into something like 10 Days Ago? If so, can anyone give the code for conversion in Vue.Js?
I hold the fetched DB records in an object called data_local as in my bellow code.
Last Activity : {{data_local.updated_at}} days ago
Use moment.js, you can get your desired data the way you want. First do install moment and then import & use.
Below are ways to get days:
Ex-1:( This will provide you No_of_Days days ago ( e.g- 10 days ago)
moment("2020-04-02 16:59:29").fromNow()
Ex-2: (If you want only 10 days without ago then use below)
moment("2020-04-02 16:59:29").fromNow(true)
For more information visit https://momentjs.com/

MS Access - Amount of recurrence calls within specific time frame

I have an MS Access DB in which I have a history of call data.
I would like to update a column which indicates, if this is a call from somebody, who tried to contact us already a specific time ago, let's say 180 minutes ago.
The column in which the number of the caller is, is called "caller" and column in which the arrival time of the call stands is labeld as "Call_Start"
In Excel I found a solution, however I have no clue how to transponse this solution into access.
Thank you for your feedback!
markus
To get the difference in minutes you would use a calculated field in a query something like;
TimeDiff: DateDiff("n",[Call_Start],Now())
The full syntax for DateDiff is here https://support.office.com/en-gb/article/datediff-function-e6dd7ee6-3d01-4531-905c-e24fc238f85f

BigQuery Google Analytics sessionsWithEvent metric

I'm having trouble creating a BigQuery query that will allow for me to fetch the Google Analytics ga:sessionsWithEvent metric.
This is what I tried:
SELECT
EXACT_COUNT_DISTINCT(concat(fullvisitorid, string(visitid))) AS distinctVisitIds
FROM
(TABLE_DATE_RANGE([xxxxxxxx.ga_sessions_], TIMESTAMP('2016-11-30'), TIMESTAMP('2016-12-26')))
WHERE
hits.type='EVENT'
The logic in the query above seems sound - get all the rows that have a hit.type of 'EVENT' and sum up the exact count of distinct fullVisitorId/VisitId results - aka. the number of unique sessions with an event.
But the numbers I get from here are close but higher than what I get using query explorer
Thank you.
EDIT: Addressing comment below to use wider date range with date filter
With date range +-5 days, this makes the query
SELECT
EXACT_COUNT_DISTINCT(concat(fullvisitorid, string(visitid))) AS distinctVisitIds
FROM
(TABLE_DATE_RANGE([xxxxxxxx.ga_sessions_], TIMESTAMP('2016-11-25'), TIMESTAMP('2016-12-31')))
WHERE
hits.type='EVENT'
AND ('20161130'<=date AND date<='20161226')
Unfortunately I still get the same number
Don't rely on the table dates, usually even on later days you can have metrics from previous days. Instead use a larger date range on from and exact date range on columns.
AFAIK also the data explorer does approximations.

SSRs Expressions Count T SQL Server 2008 Report builder

List item
Hi I am trying to count the number of times an event is raised within the last 14 days of a date. simply put if i have an opened case on the 23rd of last month i want to check the previous 14 days of the 23rd to see if there have been another event raised of the same type within that period.
Is there a reason you can't do this in the SQL, and need to have it within the RDL?
The SQL should be easy, try making use of subqueries to get around the aggregate-of-an-aggregate hurdle.
If you need to do it within the RDL, the Lookup() and LookupSet() functions might make your life easier.
If this doesn't help you, could you post a bit more detail? Data structure may help.