Insights FQL returns empty when end_time is current date - facebook-fql

I have this query:
SELECT metric,value FROM insights WHERE object_id=200829446624786 AND
metric IN("page_story_adds_unique","page_impressions_unique",
"page_impressions_organic_unique","page_impressions_paid_unique",
"page_impressions_viral_unique") AND (end_time=end_time_date('2013-03-06')) AND
period=period("days_28")
but for some reason the query returns an empty array. I changed the date to last month (2013-02-06) and it returned an array with values for the metrics I asked for.
Can anyone please explain why there were no values when I put in the current month while putting in previous months gives me sufficient values? Thanks :)

Want to improve this post? Add citations from reputable sources by editing the post. Posts with unsourced content may be edited or deleted.
Because the most recent data is always a couple of days old. On my page it is 4 days old.

Related

How to ask NetSuite saved search to return client records, when a related record does not exist, within a date range

I have client records that may have related-records indicating they attended a conference. I want to tag client records that have not attended a conference in the last 3 years. They may have conference records prior to 3 years past, but will have none onward from that.
I'm asking Netsuite to search from 3 years ago, and return client records where conference records do not exist.
My question is, how can I get NetSuite to work with a system date range, today-3 years and out into the future, in a saved search?
The first criteria is, for example, 'conference record ID is NULL.'
The date criteria something like, 'after today -1095 days.'
I got this to work by adding a 'Formula (Date)' filter as a criteria in the saved search. Then, in the description, 'after 3 years ago (relative), and the field typed-in as {today}. This worked to filter the other criteria within the date range.

MongoDB storing one day before than actual date [duplicate]

This question already has an answer here:
Mongodb saves one day less - Time Zone Issue
(1 answer)
Closed 4 years ago.
I am facing one issue to store the actual date(01/08/2018) that what I passed from model. My document is stored successfully but MongoDB store the one day before than what I passed in model.
Here I am passing the date(dd/MM/yyyy) is 01/08/2018
For more detail please check the below snaps.
After successfully saved the record, I checked in Robo 3T(MongoDB) and I show that it stored the one day before than actual value. Stored date is 2018-07-31. For more detail please see the below snap.
I hope so might be issue with timezone or offset but I don't know what is the solution.
By using Moment Library https://momentjs.com/ your issue can be solved. you have to just passed a date like below and follow the format.
var myDate = new Date(moment("2018-07-04").format("YYYY-MM-DD"))
save this to you DB it will work

How to get only the first 6 months action of all my records

I'm pretty new in Tableau. I have looked at the forum already and the answered suggested. But I'm not quite sure it match my question.
I have a bunch of records. This is about registration for a sport lesson depending on time. All of them have a start date and and some of them a finish date. The other never finish (They continue until date T with T = now).
My goal is to compare only the first 6 months of all my records, I think there are 50 of them, like the evolution during this period of time. So, for some the start date would be in January 2009, for some other, it would be in May 2016, etc.
As field provided, I have the start date and the number of person that have subscribed those lesson through time.
So, do you if there is any to achieve this goal? Is there enough detail for you to understand what I am saying ?
Thx to you guys !!
EDIT
You can find enclosed a screenshot of the result that I already have.
number of registration for all lesson through time
I'm not sure to be clear, what I try to do is to compare the first 6 months only of each courses. So the evolution of the first 6 months of this course compare to the evolution of the first 6 months of this other course and so on :)
If I understand your question correctly you are wanting to show only the first six months of your data but you want this by each category.
I am assumuming that by definition this means 6 months from the first record in your data for each category.
In order to achieve this I would create a true/false flag using a level of detail expression. As you are new to tableau I would suggest you do some reading on this but basically you can force a calculation to be at a certain level of the data rather than at the row level. You use this to find the minimum date in the table and then use a date diff to return true if the actual date field is within 6 months of this.
Create a calculated field as follows:
[date] <= DATEADD('month', 6, { FIXED [category] :min([date])})
Then drag this onto your filters pane and select "TRUE". This should give you only the first six months of records for each category.
Let me know if you need anything else.

FQL Result Issue

In looking at the stream table, the documentation says ..
updated_time time
The time the post was last updated, which occurs when a user comments on the post, expressed as a Unix timestamp
created_time time
The time the post was published, expressed as a Unix timestamp
However, when I execute a FQL query against the table I see
<created_time>1328136721</created_time>
<updated_time>1328136721</updated_time>
even though 700+ comments have been made on the post. Given the documentation, if a comment has been made on a post, I don't see how the 2 timestamps can ever be the same.
The bug seems the appear for status with 30+ comments, as per this bug report. It is currently marked "Assigned".

sqlite3: retrieving data based on month and year from local database in iphone

In my application I have to store data month wise and year wise. So for this, I have to store the data along with date into database.
My requirement is how to store in terms of date and how to retrieve data with group by month and year. In my app I am showing a table of years and months, based on selected month and year. I have to show the data in a dashboard.
My problem is in storing and retrieving date data types.
Use the following syntax
SELECT * FROM DATABASE WHERE REQUIREDDATEFIELD LIKE '%2011-01%';
2011 is supposed to be the year
01 is supposed to be the month
DATABASE is supposed to be your mysql database name
REQUIREDDATEFIELD is supposed to be the field you are hoping to sort from month and year.
like '%2011-01%' is supposed to be meaning, all the records containing 2011-01 in the given field. It could be in the beginning or the end or in the middle of a large text, so having % in both the beginning and end of the search criteria is a good habit.
You just select either for a specific month or year or month and year. Or if you want all, you use GROUP BY.
I know this answer is quite vague and generic, but that's because your question is vague. You probably need to be more specific. Explain not only what you want to do, but what you have tried, and in which way that didn't work.