Date Issue
See original GitHub issueFeel free to throw me back over to GeoNet.
I have an epoch beind updated on my Hosted Feature Service.
APIdate (type: esriFieldTypeInteger, alias: API date (epoch), SQL Type: sqlTypeOther...
If I apply a simple expression:
Date($feature.APIdate)
It returns the wrong year entirely.
However, if I check this epoch in an online tool, it converts correctly:
Im sure this is an easy one - what am I missing in my expression?
What I really want to achieve, is how many minutes since last update.
Something like this?
DateDiff((Date($feature.APIdate)), Now(), minutes)
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
Issue Date Definition: Everything You Need to Know
Issue date definition is the day on which a company issues an agreement or contract, such as an insurance policy.
Read more >Date of Issue: Definition and Examples (2022)
A date of issue, also known as the issuance date, is when a bond is issued to a startup. It's also used when...
Read more >Date of issue Definition - Nasdaq
Date of issue. Used in the context of bonds to refer to the date on which a bond is issued and when interest...
Read more >Date of Issue Definition: 453 Samples | Law Insider
Date of Issue means the date on which the notice of a decision of the Development Authority is published, or five (5) working...
Read more >Issue date - Wikipedia
Issue date ; Cover date, the date displayed on the covers of periodical publications ; Effective date, the date upon which something is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
DateDiff(Now(), Date($feature.APIdate * 1000), minutes)
returns an error because the value of the third parameter must be a string. You’re passingminutes
instead of'minutes'
, so it treatsminutes
like an undeclared variable.Try the following and it should work:
DateDiff(Now(), Date($feature.APIdate * 1000), 'minutes')
This looks like a difference between the meaning of “epoch” in UNIX versus JavaScript. What you’re looking for is:
Date($feature.APIdate * 1000)
I tested with your example and it appears to work. You’ll notice the behavior is the same in JavaScript as it is in Arcade.