Select to view content in your preferred language

Maptip not displaying date

2237
4
03-07-2011 02:26 PM
JonPedder
Deactivated User
Hello, I'm having a problem with  date display, any help would be appreciated.

The following code is to display a Maptip when the mouse is hovered over a point on the map. The field ???date??? is displaying a string of 1299253388999 in place of the actual date. I???m not sure how to format that a string as  date/time for display. Might it be that the field I'm referencing is incorrectly name (a reserved name) might that be causing the issue?

protected function clues_graphicAddHandler(event:GraphicEvent):void
   {
    event.graphic.toolTip = event.graphic.attributes.date + "\n";
    event.graphic.toolTip += event.graphic.attributes.verbal_description + "\n";
    event.graphic.toolTip += event.graphic.attributes.comments;
   }

Thanks

Jon
Tags (2)
0 Kudos
4 Replies
DasaPaddock
Esri Regular Contributor
Try:

event.graphic.toolTip = new Date(event.graphic.attributes.date) + "\n";
0 Kudos
JonPedder
Deactivated User
Super, that displayed the date thanks very much. It's an extended format, any tips on formatting teh date/time more simply?

Thanks again
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
0 Kudos
JonPedder
Deactivated User
Perfect, thanks again
0 Kudos