I have an exhibit timeline, my data is in format "2013-12-15T07:39:19.000-04:00" and I'd like to control how the date is displayed. Right now, it displays only day and month by default but I'd like it to display year as well.
Asked
Active
Viewed 170 times
1 Answers
0
My guess is exhibit using .js code?
If you want to format date to string the way you want,
Javascript can be tricky and you might have to parse on your own.
Something like this:
d = new Date("2013-12-15T07:39:19.000-04:00") date_str = d.getDate() +"-" + d.getMonth() + "-" + d.getFullYear() alert(date_str) //result depends on local computer timezone
Consider adding js library specific for date formatting, like momment.js (I have not tried it though)

mhd
- 4,561
- 10
- 37
- 53