Raza Mohd, you can't format the Date object. You can only get a formatted string object, using a formatter and a date object. (unless you want to extend Date and override its toString method ... don't do it
)
here's what I think you want:
Why would you use this? If you need to query for todays dates there is a current time function in mySQL CURDATE() and for current time there is CURTIME()