Save Date
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Saturday, September 24, 2005 03:45 AM

Hi, I am trying to save some fields in a table, one field with type Date. It only accepts date with the following format (01-Jan-05). I am reading the date as a string (24/09/2005) and then convert it to date. but i do not know to convert it to the following format (24-Sep-05) to store it in the table?? Please I need help urgently. This is my code : <% String issuedate = request.getParameter("issuedate"); DateFormat format = new SimpleDateFormat("dd/MM/yyyy"); myIssueDate = format.parse(issuedate); mindecree.setIssueDate(new java.sql.Date(myIssueDate.getTime())); %>    More>>

Hi,
I am trying to save some fields in a table, one field with type Date. It only accepts date with the following format (01-Jan-05).

I am reading the date as a string (24/09/2005) and then convert it to date. but i do not know to convert it to the following format (24-Sep-05) to store it in the table??

Please I need help urgently.

This is my code :
<%
String issuedate = request.getParameter("issuedate");
DateFormat format = new SimpleDateFormat("dd/MM/yyyy");
myIssueDate = format.parse(issuedate);
mindecree.setIssueDate(new java.sql.Date(myIssueDate.getTime()));

%>

   <<Less

Re: Save Date

Posted By:   Almagest_FUTT  
Posted On:   Saturday, September 24, 2005 03:50 AM

new SimpleDateFormat("dd-MMM-yy", Locale.UK)
About | Sitemap | Contact