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());
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquÃ? RegÃstrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.