in VTL, long and Long are the same. have you tried just using DateTool.toDate(Long) with the long?
On Thu, 06 Jan 2005 14:50:34 -0500, Mike Kienenberger <[EMAIL PROTECTED]> wrote: > I'm trying to figure out how to convert File.lastModified (type long) into a > formatted date in Velocity. > > It appears that I need to use DateTool.toDate(Long obj) to go from a long > value to a Date. > > However, neither NumberTool nor MathTool provides a method to convert a long > to a Long. I can convert it to an Integer with MathTool.toInteger(). Or > MathTool.toNumber() and -- if the number is large enough -- it'll force it > to be a Long, but it's not guaranteed. > > Perhaps DateTool should be modified to handle toDate(Number obj). Or > MathTool modified to provide toLong(), toFloat(), etc. Or both. > > Hopefully, I'm overlooking something obvious, which is why I posted to user > and not dev. > > Thanks, > > -Mike > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
