Mappable parameter for date without time - make.com

I am implementing an API that has the following requirement:
The due date should be sent in the format without time.
How can this be done? The Integromat docs mention a boolean "time" parameter of the date object, but it doesn't seem to affect anything.
The question is: how do I make this: "spent_on": "2020-02-19T23:00:00.000Z" look like this: "spent_on": "2020-02-20"?
{
"name": "spent_on",
"label": "Spent on the Date",
"type": "date",
"time": false,
"required": true
}

I am sure you figured it out by now, but if now: You have formatDate within Integromat in the text field. Then you would see formatDate(2020-02-19T23:00:00.000Z; YYYY-MM-DD)

Related

Zapier Firebase markup

I'm attempting to link my Zapier account to my Firebase account to trigger once a new entry is seen within a collection.
I've been having issues with this, and I think this is because of the query I'm using:
"orderBy": [{
"field": {
"fieldPath": "startDateInMilliseconds"
},
"direction": "DESCENDING"
}]
(this is the default example given in documentation, with my field filled in). I believe the issue stems from the fieldPath, as the field for the collection I'm ordering by is under a subcategory "d".
Here's a picture of the data that works with the above query.
He's a picture of the data I'm working with, this one does not work.
Image with the start date field.
Without this subcategory, the query works fine in testing, but within this category, the query returns an error, saying it's unable to find any documents.
Does anyone know how to change the query to work for my situation? Thanks.
If you're trying to query a property of the d field map, you will need to use dot notation to find it.
"orderBy": [{
"field": {
"fieldPath": "d.dateInMilliseconds"
},
"direction": "DESCENDING"
}]

Freebase MQL - date regular expression

I'm trying to query freebase to find out all the people who were born in specific day of a year. That is all the people that were born on August 4th regardless to the year.
I tried two methods - trying to reflect certain date (example below) or querying for people with date_of_birth. I'm using regular expression something like:
"date_of_birth~=":"*08-04"
[{
"/type/reflect/any_value": [{
"link": {
"master_property": {
"name": "Date of birth"
}
},
"type": "/type/datetime",
"value~=": "*08-04"
}],
"name": null,
"type": "/common/topic"
}]
I get the following error message:
"*08-04 is a JSON string, but the expected type is /type/datetime"
Is there anyway I can query regular expressions regarding dates?
You can do this easily using the Freebase Search API now like this:
filter=(all type:/common/topic /people/person/date_of_birth:-08-04)
Try it
As a bonus, the results are ranked by notability in Freebase so you get the most notable people born on that day.

Store Date Format in elasticsearch

I met a problem when I want to add one datetime string into Elasticsearch.
The document is below:
{"LastUpdate" : "2013/07/24 00:00:00"}
This document raised an error which is "NumberFormatException" [For input string: \"20130724 00:00:00\"]
I know that I can use the Date Format in Elasticsearch, but I don't know how to use even I read the document on the website.
{"LastUpdate": {
"properties": {
"type": "date",
"format": "yyyy-MM-dd"}
}
}
and
{"LastUpdate": {
"type": "date",
"format": "yyyy-MM-dd"
}
}
are wrong.
How can I transfer the datetime string into date format in Elasticsearch?
How can I store the datetime string directly into Elasticsearch?
You are nearly there. Set your mapping like this:
{"LastUpdate": {
"type" : "date",
"format" : "yyyy/MM/dd HH:mm:ss"}
}
Read the docs on the date mapping and its options and the date format parameter (one of the options to the date mapping).
Good luck!

Freebase MQL query to get all info about a specific date

I'm wondering if it is possible to get all info about a specific date from Freebase.
I can easily retrieve info about a date giving a specific topic, for example, to grab all persons of interest who were born on a specific date:
[{
"type":"/people/person",
"limit":1000,
"sort":"name",
"name":null,
"guid":null,
"timestamp":null,
"/people/person/date_of_birth":"1955-02-24"
}]
Is it possible to grab all types? I'm after things like people born on that date (which I have), major events (start of a war, assassination of a person of interest, etc), and so on.
Essentially I want to match all fields that are dates and return the full information about that entry, regardless of type.
Reflection is what you need here:
[{
"/type/reflect/any_value": [{
"type": "/type/datetime",
"value": "1955-02-24",
"link": {
"source": {
"id": null
},
"master_property": null
}
}]
}]
A couple of notes on that: the MQL manual I've linked to is somewhat bitrotted in its details but is still the best documentation that exists on MQL. Secondly, there's what I'm pretty sure is in MQL bug if you use "*": null or more specifically "target_value": null in the link clause above which makes it ignore the outer value you specified... so don't do that :-)

Freebase currency query

I have a little problem, maybe can you help me. I'm trying to get the "currency features" from freebase. So I tried to do : "/base/schemastaging/person_extra/net_worth": null but, I can't get the value written on freebase (for example, with Madonna, it's 650,000,000). Do you know, why it's not working ?
First of all, as the property path suggests, /base/schemastaging/person_extra/net_worth is just being staged right now so the final property ID will be something else (follow the mailing list to discuss new schema). You should NOT be using this property for anything other than experimentation.
The reason why you don't see the data that you want withe the following query is because this property is a CVT.
{
"id": "/en/madonna",
"type": "/base/schemastaging/person_extra",
"net_worth": null
}
CVT values are complex objects that need to be expanded to access the values that you want. In this case, net_worth is a CVT so that we can record a person's net worth at different points in time.
If you expand your query to include the relevant properties from /measurement_unit/dated_money_value you'll see the data that you're after.
{
"id": "/en/madonna",
"type": "/base/schemastaging/person_extra",
"net_worth": {
"amount": null,
"currency": null,
"valid_date": null
}
}
One other issue, that isn't obvious from this example, is that since there can be multiple dated money values, you'll need to make your query more precise so as to get only the latest value. You can do that like this;
{
"id": "/en/madonna",
"type": "/base/schemastaging/person_extra",
"net_worth": {
"amount": null,
"currency": null,
"valid_date": null,
"sort": "-valid_date",
"limit": 1,
"optional": true
}
}​
Update: Made net worth an optional property value.

Resources