Google Finance Error on 1st Jan Calculation - google-finance

Why is this formula returning N/A ?
=INDEX(GOOGLEFINANCE("bsx","price",date(2018,1,1)))
Yet it works fine for =INDEX(GOOGLEFINANCE("bsx","price",date(2018,1,2)))

Related

Facebook api doesn't return information if the range of time is set before 1 january 2017

Facebook api doesn't return information if the range of time is set before 1 january 2017? For example, i make this request {profile_id}/posts?since=1480543200&until=1483135200 and I recieved nothing, even an error.
This request supposed to give me all the posts of the profile between December 1 and 31 December 2016. I do something wrong? If I make a similar request, but i set as time range a date from 2017 and everythings it's going well. Thanks!
it's a facebook bug.
and it's fixed.
https://developers.facebook.com/bugs/2297783020445879/
me/posts?since=1480543200&until=1483135200
or
me/posts?since=2017-01-01&until=2017-12-31

Using Index and Match functions to return a value from multiple worksheets in a workbook

I have a url report that gets generated on a running weekly basis. Each week the report generates a new worksheet within a workbook that keeps around 6 months worth of data at a time. I want to find and pull the data on a specific url from the worksheets and display them in a new worksheet.
For example data in a worksheet might look like:
Week of Mar 9
URL | Visits | Conversions
mysite.com/apple | 300 | 10
mysite.com/banana | 100 | 20
mysite.com/pear | 600 | 5
And each worksheet in the workbook is a different week, such as Mar 2, Feb 23, etc.
Now, I want every Apple url in one worksheet so that I can compare...Apples to Apples...(pun intended). Since there are hundreds of these I can't afford the time to manually do this for each segment I need, so I tried the following.
=INDEX('312015'!8:999,MATCH("apple",'312015'!8:999,-1))
I'm uncertain of which switch to use for Match, other than 0 is "exact match" from what I read online, so I tried both 1 and -1 to get a not-exact match, though reality is I probably need a partial-match since apple is only part of the url.
Any suggestions on how to get this to work or a better way to do this in excel would be great. Also, I can not manipulate the report output themselves as it comes from a third party vendor and I've already asked them about adjusting this.
I thought about using vlookup as well, but I believe that only returns the first result with that value and not multiple ones.
Assuming URL in ColumnA, Visits in ColumnB, Conversions in ColumnC for your source data, and in another sheet your page (fruit: apple/banana/pear) in A1,Visits in B1, Conversions in C1 and sheet names in A2 downwards, then I suggest in B2:
=INDEX(INDIRECT($A2&"!B:B"),MATCH("*"&$A$1,INDIRECT($A2&"!A:A"),0))
in C2:
=INDEX(INDIRECT($A2&"!C:C"),MATCH("*"&$A$1,INDIRECT($A2&"!A:A"),0))
and the two formulae copied down to suit.
This is looking for an exact match but does so with a wildcard.

Web server subtracting 1 hour from dataset datetime for some days

We have a web server running Windows 2003 Standard and the time zone is set to GMT-06:00 Central Time, and the box is checked to adjust for daylight saving changes.
A web service on this server queries a datetime field and when the datetime is fetched it is correct. When the dataset is returned to the client 1 hour is subtracted from the datetime if the date is Mar 9-31, Apr 1-5, Oct 26-31, or Nov 1-5. These are the dates that the DST time change can happen on.
It does not matter when the data was saved to the database. If I save a date of 4/1/2013 today, it will be returned to the client minus the 1 hour.
We have verified that SQL is storing the date correctly since it is being returned to the web service correctly.
If I convert the date to a date string at the web server before returning it to the client, the correct date string is returned.
All dates outside of the possible DST dates are good.
All dates during DST that are not on a possible change date are good.
As an example, a date saved as 4/1/2013 12:00:00 AM will be returned as 3/31/2013 11:00:00 PM.
A date saved as 4/6/2013 12:00:00 AM will be returned as 4/6/2013 12:00:00 AM.
I added a web method to the web server to return a date value of Now() and it returns the correct date.
The only thing I have found that is similar was something about a XML rule that says all datetime values are to be transmitted using an offset. I'm not 100% sure but I don't think this is it because only some dates are changed.
Any thoughts/suggestions of what else to look at to get this resolved?
Edit: I have found some dates on the dates listed above that are correct.
I'm going to take a shot at expanding this question, since i've had a similar issue in serialization of data objects.
Take a System.DateTime object that you want to write into a DataColumn. The DateTime object will by default return the DateTime.Kind property as [Unspecified]. When the DataColumn is then set to this DateTime object the DataColumn has a DateTimeMode property that resets to [UnspecifiedLocal].
There is not offest during serialization of DataColumn when the DateTimeMode is [Unspecified] or [UTC]. But when the DateTimeMode is set to [UnspecifiedLocal] or [Local], the offeset is applied. This is where the time can go up or down depending on the timezone or daylight savings configuration.
Sad news is that I can share your problem, but don't have a decent solution. Hope this helps your search.
I can only think of some ugly solutions, but i have not tested any. If i find an elegant solution i will try post again.

FaceBook Time zone and Event Times

I am trying to add Events To FaceBook with the Time Zone option enabled. I am trying to add Events in UK with time zone as "Europe/London" . This is what I am noticing.
When I send the following Start & End times
[start_time] => 2014-08-24T20:00:00+0100
[end_time] => 2014-08-24T22:00:00+0100
I get the time as
[When]
Sunday, August 24, 2014
[Time]
8:00pm until 10:00pm
when viewed from FaceBook Site. My time zone is set to London which is UTC. But when I send an event in November,
[start_time] => 2014-11-24T20:00:00+0000
[end_time] => 2014-11-24T22:00:00+0000
it is getting displayed as
[When]
Monday, November 24, 2014
[Time]
9:00pm until 11:00pm
Is this an expected behavior. Will the time be adjusted and 8 PM will show correctly on Nov 24th?
Thanks
Lynn
One small correction. You said:
My time zone is set to London which is UTC
The Europe/London zone is UTC+00:00 in the winter, which is commonly called GMT. In the summer it switches to UTC+01:00. which is commonly called BST. It wouldn't be accurate to say that London is UTC. I think you knew this already, I'm just stating it here for others.
Unfortunately, the behavior you describe is expected for Facebook. It comes down to the fact that Facebook doesn't know you are in Europe/London. It simply gets your current time zone offset from JavaScript's new Date().getTimezoneOffset() when you log in. Since it's currently UTC+01:00, that's the offset that is applied to the events when you view the page as a user. It makes a flawed assumption that the offset will not change, or that you won't be looking at future event times until after the next transition.
The Facebook Graph API represents this in the user object. It has a timezone property that is just a number. I guess the Facebook developers haven't read the timezone tag wiki where I make clear that "Time Zone != Offset".
Will the time be adjusted and 8 PM will show correctly on Nov 24th?
Yes. It will show the correct time as soon as the user logs in after the next switch from BST to GMT, which is on October 27th this year.

Google charts issue driving me nuts

I'm trying to generate a chart via the following url:
http://chart.apis.google.com/chart?chxl=0:|Mon|Tue|Wed|Thu|Fri|Sat|Sun&chxt=x&chbh=a,6,10&chs=320x225&cht=bvg&chco=A2C180&chds=0,95&chd=t:0,0,300,500,0,0,0&chtt=Test
The values are 0 for everything except for Wed and Thu when they are 300 and 500 each. However, the bars in the chart are identically long for wed and thur although wed is representing 300 and thu is representing 500.
I've checked the url format many times and can't find any problem with it. Am I doing something wrong or is this a bug with google charts?
I figured it out.
The chds argument must contain the highest value of the dataset against which all other values are compared, I had copied & pasted my url and had '95' as the chds which is why both 300 and 500 showed equally, changing it fixed the problem.
It might be a scale problem ; can you print values on the vertical bar, every 10 for example ?