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

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?

Related

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

400 - Bad Request while saving Date Only field in CRM using Web API

I am using Microsoft Dynamics 365 Web API approach to interacting with CRM data.
Here I want to update the field with type: DATE and TIME.
Date value I am passing in the request body is as below:
"packfirstday":"1-15-2018"
Except for above, I have also tried with DateTime and with different date formats.
e.g.
mm-dd-yyyy
m-dd-yyyy
mm/dd/yyyy
yyyy/mm/dd
yyyy-mm-dd
PS: I try to post without date field it is saving details successfully.
The problem is not with the code, the simple misunderstanding.
There are 2 components namely Behavior & Format. You have Format set as 'Date only' not the Behavior. Behavior decides the Database terms whereas Format is used for displaying datepicker controls in Form.
So when you set the field in web api with only date part - the CRM database expects time part also.
Either set behavior also as date only, so this will work:
"packfirstday":"2018-01-15" //YYYY-mm-dd format
Or change your code to pass time part also:
"packfirstday":"2018-01-15T11:10:00.000Z" //UTC offset
Since user local behavior still expects the time part.

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.

Facebook Graph API feed order by created_time

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.

Resources