| Author |
Regarding Date functions in java
|
Pravin Reddy
Greenhorn
Joined: Dec 01, 2004
Posts: 8
|
|
hi friends, I am trying to read a file where date is in the form of string like 23-MAR-2004. I want to check whether the string i.e., 23-MAR-2004 is valid date or not .. and if it is valid date.... i need to store in a variable. Is there any function to check whether it is valid date or not? if not, any other way? Bye Pravin
|
 |
Sripathi Krishnamurthy
Ranch Hand
Joined: Mar 07, 2005
Posts: 232
|
|
just for you http://www.rgagnon.com/javadetails/java-0099.html
|
 |
Srinivasa Raghavan
Ranch Hand
Joined: Sep 28, 2004
Posts: 1228
|
|
|
You can use the SimpleDateFormat class & parse this string. if it's not a valid date in the specified format you get an exception.
|
Thanks & regards, Srini
MCP, SCJP-1.4, NCFM (Financial Markets), Oracle 9i - SQL ( 1Z0-007 ), ITIL Certified
|
 |
 |
|
|
subject: Regarding Date functions in java
|
|
|