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)
Try converting the date to a string using the Text function.
Text($feature.CreationDate, 'Y-MM-DD')
This one doesn't give me the date
The function is "Text", not "Date".
Is there a way to get a 'Date' value that does not have time included?
Thank you,
Randy McGregor
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
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.