Hello,
I am trying to label symbols in AGOL and I wrote this arcade but I can't remove time from date?any suggestion.
"Owner of Scooter" + " : "+DomainName($feature,"vehicle_company")+" Inspection Date : "+Date($feature.CreationDate)
This "removes" the time from a date field. (In actual fact it just resets it to 12:00:00pm but it serves the same purpose). Remember to put a '-1' after the month because January is 0.
var day = text($feature.DateOfRecord, 'DD')var month = text($feature.DateOfRecord,'MM')var year = text($feature.DateOfRecord,'YYYY')var notimedate = date(year,month-1,day)return notimedate
Is there a way to get a 'Date' value that does not have time included?
Thank you,
Randy McGregor
The function is "Text", not "Date".
This one doesn't give me the date
Try converting the date to a string using the Text function.
Text($feature.CreationDate, 'Y-MM-DD')
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.