Select to view content in your preferred language

Dates displaying in wrong format

574
1
10-18-2010 02:02 AM
GavinTrowles
Emerging Contributor
Hi

I have recently had an error come to my attention whereby the dates on my map (that I retrieve from a service) are displaying incorrectly. Instead of showing the date text like "1284378356999" is being displayed to screen.

I have not changed the code for the page but Im unsure if something has changed at the service level (this is maintained by a seperate team). Has any experienced this issue before?

Many thanks
0 Kudos
1 Reply
GlenRhea
Emerging Contributor
That looks like Unix Time and you can convert it to whatever format you want.

This site explains how to do it in js:
var myDate = new Date( your epoch date *1000);
document.write(myDate.toGMTString()+"<br>"+myDate.toLocaleString());
0 Kudos