Srinu.Reddy wrote:
Hi All,
I am new to JSp programming.My problem is I am having a STRING which has a
date in it as (2002-10-31 20:45:00 ) but I want to display that in the
following format : (31-OCT-2002 08:45:00 PM). How can I do that?
You can use the JSTL formatting actions:
Fo
Thank you very much Roldan. It is exactly what I wanted.
Regards,
Srinu...
-Original Message-
From: ROLDAN, Gabriel raul [mailto:gabriel.raul.roldan@;BIZKAIA.NET]
Sent: Tuesday, November 05, 2002 5:29 PM
To: [EMAIL PROTECTED]
Subject: Re: Converting string to date format.
<%@ p
<%@ page language="java" import="java.util.*, java.text.*" %>
<%
String dateString = "2002-10-31 20:45:00";
DateFormat inputFormat = new SimpleDateFormat("-MM-dd hh:mm:ss");
Date myDate = inputFormat.parse(dateString);
DateFormat outputFormat = new SimpleDateFormat("dd-- hh:mm:ss a");