how to calculate UTC timestamps difference in OpenOffice? - openoffice-calc

I've two columns with start and ending timeStamps in UTC format as follow '2016-06-24T18:22:52.918Z' & '2016-06-24T18:25:03.621Z'. I've around 10K values in each column, but I'm not able to find any clue to calculate the difference between those timestamps in OpenOffice. Please let me know if you know a way to achieve this?

Subtract the later value from the earlier one, something like:
=B1-A1
Format to suit.

Related

Amazon Quicksight Calculated Fields

I'm having a problem with what should be a very simple calculated field. I have two conversion numbers, let's say a "7 day click" number and a "1 day view" number.
I'm trying to create a calculated field that simply adds these two numbers together.
Yet, this is the result I'm getting:
As we can see, the all conv value is not simply adding the other two columns. What am I doing wrong in the calculated field?
Thanks in advance, as I've spent way too much time trying to figure out such a simple thing
EDIT:
It appears that, when I add a new grouping, that the problem consists of null values in one of the two columns. example:
How can I change the calculated field to account for this? In the data warehouse, these blank values are just null values.
Thanks
I tried out what You did and it works fine for me:
QuickSight Table
Calculated field
I suppose there is something wrong with Your dataset.
Probably the granularity of the date field is not day but something else like hour and the calculated field tries to add eg. 11 Jun 10:00 + 12 Jun 11:00.
This is of course wrong. You need to add 11 Jun + 12 Jun.
Probably You need to extract the day of Yours date field.
to my question about the calculated field, this was what I used that worked.
ifelse( isNull({conv_1dv}), 0, {conv_1dv}) + ifelse(isNull({conv_7dc}),0,{conv_7dc})

Power-BI: Add column in Data-Area or Add Column in Power-Query

I am wondering where the difference in both approaches lie.
Basically I want to add a column which indicates as a result with TRUE or FALSE if a data row is inside my time period I have to consider (all values older than current calender week - 1).
For my understanding I have two options:
Option 1:
I modify my data query and add a new column with a formula like this in Power-Query:
DATEDIFF(WEEKNUM([created].[Date]),WEEKNUM(TODAY()),WEEK)
Option 2:
I use the Data-Section in Power-BI and add a column wiht this formula:
DATEDIFF(WEEKNUM([created].[Date]),WEEKNUM(TODAY()),WEEK)
What is the difference of both approaches, using either the backend PowerQuery vs the Data-Section in Power-BI. Is one more favourable?
Common answer in PowerPivot world suggests calculated columns are very costly, therefore better to choose PowerQuery to do the data preparation work. I suppose it depends on how many rows you have and how many other calculations you are asking PP/DAX to do as you are now storing a value that can be easily calculated.
Independent of "cost", I tend to use DAX for dynamic calculations and land more static values using PQ/M which allows for some very creative extract/transform/load (ETL). Think of it this way: if you put the formula in Excel, calculate for 1MM rows it has to recalculate every time you do, well, anything. So what do you do? Use the formula to calc the value then paste values so you just keep the answer. PQ can deliver the final result and drop the calcs or -- better -- intermediate data.
JR

Charts.js candlestick (Financial Charts) Timeformat Question

I want to fill the chart with data I pull via PHP from an API. For some reason I have issues to format the date correctly so the chart currently shows no bars with my data.
A data set from the random data looks like this:
{"t":1494806400000,"o":"35.19","h":"36.79","l":"33.94","c":"36.15"}
One from me like this:
{"t":1591092000,"o":"33.3900","h":"34.2000","l":"32.4100","c":"34.1900"}
I see that there are three 0 missing in mine, but even when I add them it's not working.
I have also checked the dates at https://www.unixtimestamp.com/index.php to find a difference but the original dates is outputted as 01/05/49229 # 12:00am (UTC) which looks very odd to me.
Can anyone tell me in which format the date needs to be? d M Y h:i:s is what I currently do in php, but it neither works without the seconds.
5-months later:
I would recommend looking into the Luxon Library to get the values for t,
https://moment.github.io/luxon/docs/class/src/datetime.js~DateTime.html
Other wise I do believe its Year Month Day hours:minutes:seconds

Cumulative sum & several filters

I think I have a simple question, but I'm currently stuck. I uploaded an example file here:
https://ufile.io/7iv97
I want the graph to show a cumulative sum, the thing is: It should calculate from the beginning of the data source until the date on the filter.
The problem is: When my filter does not cover the data since the beginning, the cumulative sum is calculated since the starting date of the filter (I want the cumulative sum to ignore it)
I guess this is simple but I couldnt solve it, so I made a simple example to make it easier to answer my question.
It shows 25 when the filter covers the entire period, but less when I move the filter beyond the starting date:
Thanks in advance!

POWER BI datesdifference excluding weekends

This is formula that i use
CALCULATE(SUM(Dates[IsWorkDay]),DATESBETWEEN(Dates[Date],
'table1'[date1],'table1'[Date2])))
This is the formula I use... between dates that look like below image.. I want to exclude weekends..... but the result that I get is not correct .... when the actual difference is only one day ... I get it as 4 days ... it differs a lot.. can some one please help
enter image description here
The Data type of all the dates in the formula needs to be in the same format.
For Example: keep it as just date(mm/dd/yy).
Your calculated column is right and it should work once you fix the data types.