Facebook Graph API feed order by created_time - sorting

I`m using query like
me/feed?fields=id,status_type,link,full_picture,type,description,name&since=2014-08-28T11:24:13&limit=30
But API response contains latest post at top
I want to see the post that created after 2014-08-28
What can I do for it?

As https://developers.facebook.com/docs/graph-api/using-graph-api/v2.2#paging outlines, you have to use Unix timestamps for the since parameter:
since : A Unix timestamp or strtotime data value that points to the start of the range of time-based data.

Related

How to extract "last updated" date from this URL to google sheets

I have tried this, but I get three dots
=IMPORTXML("https://covid19.sabah.digital/covid19/","//span[#class='number-last_updated']")
When I saw the HTML data, it seems that the last updated date is displayed by Javascript. By this, unfortunately, the value cannot be directly retrieved with IMPORTXML. This has already been mentioned in the comments.
When I saw the HTML data again, I noticed that the information of date is included in https://data.covid19.sabah.digital/global.json. From this data, how about retrieving the last updated date? In this answer, as a workaround, in order to retrieve the last updated value, I would like to propose to retrieve the data using the following sample formula.
Sample formula:
=TEXT(MAX(ARRAYFORMULA(DATEVALUE(REGEXEXTRACT(QUERY(IMPORTDATA(A1),"SELECT Col1 WHERE Col1 contains 'date'"),"\d{4}-\d{1,2}-\d{1,2}"))))+1,"yyyy-MM-dd")
In this formula, please put the URL of https://data.covid19.sabah.digital/global.json to the cell "A1".
The flow of this formula is as follows.
Retrieve the JSON data using IMPORTDATA.
Retrieve the data values from the retrieved data using QUERY.
Convert the text to the serial number using DATEVALUE.
Retrieve the max value using MAX.
It seems that when this value is added by 1, it is the updated date.
If you don't need this, please remove +1 from the formula.
Convert the serial number to the text using TEXT.
Result:
References:
IMPORTDATA
QUERY
DATEVALUE
MAX
TEXT

Query on Ali baba Cloud Billing API BOA

I was trying to get some data by using one of the api call QueryInstanceBill
The resulted JSON seems to be long and there is no date column to filter on how i got those many records.
Could someone here help me out
To be able to filter by date, The billing date only used when Granularity is DAILY,format: YYYY-MM-DD. Example 2020-07-29
You can also use the "BillingCycle" field in the request:
The billing cycle. Format: YYYY-MM. Example: 2020-07
Documentation:
https://www.alibabacloud.com/help/doc-detail/100400.htm
QueryInstanceBill API returns data for billing cycle which is usually for a month (YYYY-MM)
If you want data for a particular date then in request parameter provide the value for field "BillingDate" in format: YYYY-MM-DD
and the value for field "Granularity" should be "DAILY"
Check out the documentation:
https://www.alibabacloud.com/help/doc-detail/100400.htm
Also, you can use OpenAPI Explorer, I have provided BillingCycle as "2019-10", BillingDate as "2019-10-15" and Granularity as "DAILY":
https://api.aliyun.com/#/?product=BssOpenApi&version=2017-12-14&api=QueryInstanceBill&params={%22RegionId%22:%22cn-hangzhou%22,%22Granularity%22:%22DAILY%22,%22BillingCycle%22:%222019-10%22,%22BillingDate%22:%222019-10-15%22}&tab=DEMO&lang=JAVA

ngx-mydatepicker is formatted as jsdate and doesn't format back to normal date angular 4

I am using ngx-mydatepicker in my angular 4 application with reactive forms. I am binding date field to input field from rest api which is in the format "OrderDate": "2018-07-03T15:58:20.183". This doesn't populate date in input field directly so we need to convert it to jsdate as suggested in this post githubissue as in the below code snippet
'OrderDate': [{jsdate: new Date(data.OrderDate)}, Validators.required],
Now the date appears in the input field as expected. Now the actual problem is while submitting the form the date is coming in this format as in the below screen shot which is not accepted by rest api. So I need to convert it back to the api accepted format, how do I do it and my form contains more than 40 fields where am posting the form directly to api, so if I need to format the date I should explicitly again edit the form data before sending it to api. Is there a way that the date will format directly without explicit formatting. If there is no way then how to format back to normal date format.
Thanks in advance
Try the format using toISOString,
new Date(field).toISOString()
Reference

What is the expected date format for the mailchimp export API?

I'm trying to use the mailchimp export API in order to keep our internal database in sync with a list we've got in mailchimp.
To do this, I am using the mailchimp export API https://apidocs.mailchimp.com/export/1.0/. According to the documentation, you can pass a since parameter, which I have done with success, but only when I pass a date like this 2015-10-01, but I would like to add a a time factor to it.
I've tried UTC, as well as various other formats.
Does anyone know how to format a date time value for this since parameter?

Listing messages with more precision than yyyy/mm/dd

I'm trying to get all the messages sent to a user after a certain point in time, by using the Gmail API. I've successfully retrieved messages after a certain date by using the query q=after:2015/01/19 in the API Explorer.
I would like to be more specific than this and specify an hour and a minute of the day. Is this possible? I ask since the Advanced Search-specification only contains the most useful operators.
You can use a search query to list messages after a certain date with second accuracy.
Use the search term after:SOME_TIME_IN_SECONDS_SINCE_EPOCH. Gmail supports the after keyword using a timestamp instead of the yyyy/mm/dd format.

Resources