I was looking for a simple way to get a date object into MM/dd/yyyy format and it took forever before i realized that Servoy is using it’s own instantiations of common java objects/methods
here is how I finally got it to work:
myform.find()
var simpledate = java.text.SimpleDateFormat(“MM/dd/yyyy”)
date_ordered = simpledate.format(globals.s_date_ordered)
date_recieved = simpledate.format(globals.s_date_recieved)
myform.search(true, false)
The simpledate object (type SimpleDateFormat) can be used over and over again, it holds the desired formatting. You simply need to instantiate it once.