The differences between Query and Identify is the expected behavior. The Identify (and Find) operations always return results as formatted text - even numeric values are returned as strings. You can workaround this by creating a new date based on the date string then format that value. For example,feature.attributes.created_date = new Date(result.feature.attributes.created_date); var template = new esri.InfoTemplate("Attributes", "${created_date:DateFormat(datePattern:'MMMM d, yyyy.',selector:'date')}");
feature.attributes.created_date = new Date(result.feature.attributes.created_date); var template = new esri.InfoTemplate("Attributes", "${created_date:DateFormat(datePattern:'MMMM d, yyyy.',selector:'date')}");
var dt = new Date("06/08/2012 16:25:45"); alert(dt.toUTCString());
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.