Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to initialize a Date type with a custom String?

807599Dec 1 2006 — edited Dec 1 2006
Hi there to everyone reading my post!

I was wondering if there is a way to initialize a Date type with a customized Date I have to pass in the Format dd/mm/yyyy

In other words, how Do I make it for a java.sql.Date or a java.util.Date to have a dd/mm/yyyy as its value?

Just speculating.......
Date mydate = new Date (01/12/2006);
how Do I make that happen ?

Please Help me....

PD: I need it initialized like that so that Later I can Compare it with other Dates using
after(Date),
before(Date)
methods....
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 29 2006
Added on Dec 1 2006
7 comments
4,508 views