File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
How does a parse method in Date class work
Joined: Mar 16, 2005
Jun 16, 2005 14:45:00
hai guys , how does a parse method of a date class work, i am totally confused how does it work.
plz check out this program and plz help me how does the parse method works
public class DateProg
p = new
Date dt = sdate.parse(date,p);
Joined: May 20, 2005
Jun 16, 2005 16:55:00
So what results do you get when you run this program? I would change the method signature of your method to:
public static void main (String args)
and add a semicolon after 050716.
Let me know if what you get is what you intended.
-Rich, SCJP 1.4
I agree. Here's the link:
subject: How does a parse method in Date class work
Best Way to parse a string to a unexpectable Date Format
string to date conversion problem
How to print default date in required format
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013