Home arrow static arrow Java Programming [Archive] - Date conversion problem
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - Date conversion problem
This topic has 3 replies on 1 page.

Posts:43
Registered: 5/26/04
Date conversion problem  
Jun 16, 2004 1:46 PM



 
Hai All,

I have got a problem in converting the format of string.
I have a string readydate = "2004-02-24 07:15:00"
i have to convert this string to '24-feb-04'.
can any one plz let me know how to do this.

string readydate = "2004-02-24 07:15:00"
required o/p "24-feb-04".
The o/p should also be in string as this need to be inserted into Oracle db.

Any help would be Appreciated,
Thanks in advance
Pooja.
 

Posts:1,183
Registered: 1/23/02
Re: Date conversion problem  
Jun 16, 2004 1:47 PM (reply 1 of 3)



 
[url http://www.javaalmanac.com/egs/java.text/ParseDate.html]Parsing a Date Using a Custom Format[/url]
[url http://www.javaalmanac.com/egs/java.text/FormatDate.html]Formatting a Date Using a Custom Format[/url]
 

Posts:43
Registered: 5/26/04
Re: Date conversion problem  
Jun 16, 2004 1:58 PM (reply 2 of 3)



 
Hai
Thanks for ur reply
Can u let me know what format do i need to use inorder to get the desired output.

Thanks onceagain
Pooja
 

Posts:6,750
Registered: 1/25/04
Re: Date conversion problem  
Jun 16, 2004 2:07 PM (reply 3 of 3)



 
You know about the API documentation, right?

http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html
 
This topic has 3 replies on 1 page.