# Vision easy chart X-trace date format in milliseconds

**URL:** <https://forum.inductiveautomation.com/t/vision-easy-chart-x-trace-date-format-in-milliseconds/99933>\
**Category:** Ignition\
**Tags:** ignition81, vision\
**Created:** [December 17, 2024, 3:43pm UTC](https://forum.inductiveautomation.com/t/vision-easy-chart-x-trace-date-format-in-milliseconds/99933 "2024-12-17T15:43:55Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [December 21, 2024, 4:53am UTC](https://forum.inductiveautomation.com/t/vision-easy-chart-x-trace-date-format-in-milliseconds/99933/3 "2024-12-21T04:53:06Z")

</div>

I developed this [confiureChart extension function script](https://forum.inductiveautomation.com/t/time-format-on-easy-chart-x-axis-and-x-trace/80437/6) some time ago for modifying the date and time formats of that label:

```python
#def configureChart(self, chart):
	from java.text import SimpleDateFormat
	from org.jfree.chart.axis import DateAxis
	
	# https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html
	pureDateFormat = SimpleDateFormat("yyyy/MM/dd")
	
	# The capital S is for millisecond format
	pureTimeFormat = SimpleDateFormat("h:mm:S a")
	dateAxis = DateAxis()	
	plot = chart.plot
	plot.setDomainAxis(dateAxis)
	plotField1 = plot.getClass().getDeclaredField('dateFormat')
	plotField2 = plot.getClass().getDeclaredField('timeFormat')
	plotField1.setAccessible(True)
	plotField2.setAccessible(True)
	plotField1.set(plot, pureDateFormat)
	plotField2.set(plot, pureTimeFormat)

```

...but you get what you pay for; this approach won't be nearly as reliable as the NoteChart's implementaion.

---

_[View the full topic](https://forum.inductiveautomation.com/t/vision-easy-chart-x-trace-date-format-in-milliseconds/99933)._
