This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
hi that is not working. Because the return type of format() is string ,but i want the return type to be Date object.So to convert the string to Date if i use parse then again the output is in hh:mm:ss format,but i wanted it to be in hh:mm format.
I'm a little confused. "Format" doesn't make sense for a Date object. Dates are only formatted when they become string representations of Dates. So the return type should be a String.
Perhaps what you want is to set the seconds of the date to zero? To do that, take a look at the Calendar class.
Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.