Date formatting on a JSP
We are working with JSP 1.1 I have situation where the date field (input field) is populated from the database and needs to formatted for display.
<td colspan="3"><input type="text" name="exDate" size="20" maxlength="16" value="<%=Bean.getExDate()%>"></td>
Since, we are using JSP 1.1, I cannot use the Standard Tag libraries and the fmt date tag available.
I can accomplish the formatting by creating formatfunction and storing the bean value in a hidden field,etc..
But, I am looking for something straightforward like specifying a pattern or a class in the CSS that will do this for me, without manipulating the value.
Thanks
there's no date formatting stuf fin CSS. Why not use java.util.SimpleDateFormat then?
<%= new SimpleDateFormat("MM/dd/yyyy HH:mm:ss z").format(Bean.getExDate())%>
Similar Messages
-
Controlling the data formatting in excel using jsp.
Hi,
How to controlling the data formatting in excel using jsp with out using external jar files such as "jexcel" and "POI". And one more limitation is that it should be compatible with java 1.2.1dineshniot wrote:
Hi - Is there any possibility to automatically display the chart for the logged datas using write to measurement file or write to data file? Please let me know as soon as possible.
Thanks and Regards,
Dinesh
As an aside, "data" is already a plural. The singular is "datum."
Bill
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all. -
Please Help !!!! Problem with Date Format in JSP
Hi all,
I am getting the following date format
Sun Jun 05 00:00:00 GMT+05:30 2005
as output of the below mentioned code:
<% Date avldt=new Date(ts.parse(dt).getTime());%>
<% out.println(avldt);%>
But, I want to get 05-06-2005 instead of the above and then convert it into 2005-06-05 (YYYY-MM-DD) in order to store it into Mysql table as date field.
Please advice, what should i do for it ?
Thanks for any help in advance.
regards,
savdeep.a)To convert Date into String and back use java.util.SimpleDateFormat
b) To insert a Date in a DB you should try to use preparedStetement this allows you to use the method setDate(java.sql.Date adate) in stead of relying on your own convertion. -
How to change the date format?
Hi,
I need to display the data format as(YYYY-MM-DD). But now it displays(2009-1-9)
Here is my code snippet which i used to display the data format as(2009-1-9)
*<INPUT TYPE=TEXT NAME="date_submitted" MAXLENGTH=20 SIZE=10 VALUE="" onBlur= "return dateSubmitted()"> (YYYY-MM-DD)*
*<SCRIPT LANGUAGE="javascript">*
dateSubmitted()
*</SCRIPT>*
function dateSubmitted()
if (document.pgUpdate.date_submitted.value == "")
date = new Date();
month = date.getMonth() + 1
document.pgUpdate.date_submitted.value =
date.getYear() + "-" + month + "-" + date.getDate();
return true;
Can anybody help me how to change the date format?
Thanks in advance!prit123 wrote:
use SimpleDateFormat class. The code is :He posted a Javascript related question, not a Java related question.
Please use forums devoted to Javascript. You're here at a Java/JSP forum.
There are JS forums at webdeveloper.com and dynamicdrive.com. Good luck.
String formatPattern = "yyyy-mm-dd";
SimpleDateFormat sdf = new SimpleDateFormat(formatPattern);
sdf.format(yourdate);yyyy-mm-dd denotes year-minutes-days. Please go read the SimpleDateFormat API as well. -
Hi,
I am relatively new to XML and JSP.I am on a project where i have to transfer data to and from an Oracle 8i database to XML using JSP.everything worked fine except for the follwing:
the date format in xml is always 'yyyy-mm-dd HH:MM:SS'.
the datatype is date in oracle and string in jsp.when i try to upload the data in XML to oracle it gives me date format not recognised error.I ve tried using trunc and to_char in the query which fetches records into a recordset in JSP but to no avail.i keep getting the same format.
Can someone please help with with having the date format as 'dd-mon-yyyy'.
Thanks a heap for the help
regards,
VinayakHi,
I ve tried out the solutions suggested by you and tried using java.sql.Timestamp
as follow:
<%@ page import="java.sql.*" %>
<%@ page import="java.io.*" %>
<%@ page import="oracle.sql.*" %>
String dateString = rset.getString("installation_dt");
java.sql.Timestamp date = new java.sql.Timestamp.valueOf(dateString);
But tomcat throws up the following error
:104:
cannot resolve symbol
symbol : class valueOf
location: class java.sql.Timestamp
java.sql.Timestamp date = new java.sql.Timestamp.valueOf(dateString);
Hope you can help me.
Thanks a heap
Regards,
Vinayak -
Class Cast Exception for Date Format .
Hi Friends ,
I am getting a error for casting type from Object to Date type .
Could you please some one help me . I am using a prepared statement in OAF for inserting a data .
All fields are inserting except Date format .
My code in controller as follows :
try { String StartDate=row.getAttribute("StartDate").toString();
// String StartDate="30-Apr-2011";
DateFormat formatter ;
Date StartDate1;
formatter = new SimpleDateFormat("dd-MMM-yy");
StartDate1 = (Date)formatter.parse(StartDate);
//System.out.println("Today is " +date );
pstmt.setDate(12,StartDate1);
} catch (ParseException e)
{System.out.println("Exception :"+e); }
Thanks in Advance ,
KeerthiThanks so Much for the quick response .
Exception Details.
oracle.apps.fnd.framework.OAException: java.lang.ClassCastException at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:888) at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1145) at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(OAPageErrorHandler.java:1408) at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2637) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1659) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418) at OA.jspService(OA.jsp:40) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803) at java.lang.Thread.run(Thread.java:534) ## Detail 0 ## java.lang.ClassCastException at SONY.oracle.apps.inv.xx_slapg.webui.ServiceRequestCO.processFormRequest(ServiceRequestCO.java:153) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:799) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363) at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1118) at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363) at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363) at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363) at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2633) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1659) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418) at OA.jspService(OA.jsp:40) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803) at java.lang.Thread.run(Thread.java:534) java.lang.ClassCastException at SONY.oracle.apps.inv.xx_slapg.webui.ServiceRequestCO.processFormRequest(ServiceRequestCO.java:153) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:799) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363) at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1118) at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363) at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363) at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363) at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2633) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1659) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418) at OA.jspService(OA.jsp:40) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803) at java.lang.Thread.run(Thread.java:534)
Here is my code .
java.util.Date StartDate=(java.util.Date)row.getAttribute("StartDate");
------------------------------------------------------------------------------------------------ -
Displaying data in xml using jsp
how do we display data in database from jsp using xlst format in xml browser view
how do we display data in database from jsp using xlst
format in xml browser viewRefer this Post
http://forum.java.sun.com/thread.jsp?forum=45&thread=482077&tstart=0&trange=15
-Regards
Manikantan -
Converting a string into Date format
I am currently using a JSP.
I currently need to convert a string that holds a date in "dd/mm/yyyy" format to the jva.sql.Date format.
Any ideas as to what the proper way of doing this is?
Many thanks pplpublic java.sql.Date parseDate(String s) {
java.text.DateFormat dateFormatter= new java.text.SimpleDateFormat("dd/MM/yyyy");
return new java.sql.Date(dateFormatter.parse(s).getTime()); -
"Date formatting not supported yet"??
When I add imports to get around the problem described in my previous
email, I run into an exception that says "Date formatting not supported
yet". The exception is thrown in util/HtmlUtil.java. What's the
intention here? Why don't we just return the value unformatted? How
should I handle this so I can take advantage of the formatting if it is
supported someday? Are there any other formatting types which I need
to "handle" in order to run?Dan--
When I add imports to get around the problem described in my previous
email, I run into an exception that says "Date formatting not supported
yet". The exception is thrown in util/HtmlUtil.java. What's the
intention here? Why don't we just return the value unformatted? How
should I handle this so I can take advantage of the formatting if it is
supported someday? Are there any other formatting types which I need
to "handle" in order to run?The exception lets you know that there is a specific issue you need to work
around during migration. The reason we don't just return the unformatted
value is that we didn't want to give the impression that date formatting
worked when it doesn't (yet).
If you just want the value to come through without an attempt at formatting,
the correct thing to do is to change your JSP tags to eliminate the date
formatting attributes. If this is a loss of data (the format masks), then
you should just comment them out rather than delete them.
The whole issue of date formatting is unfortunately complex. Suffice to say
that it is far easier for the developer to format the date as they wish in
their code then it is for us to try and provide generic date formatting.
The issue revolves around having all the necessary information in order to
do the formatting in a generic way.
Todd -
Regarding Date Format Conversion
Hi,
In my project i am picking the date from the date picker which is a javascript program . Then i am displaying it on a jsp page .It is coming in mm/dd/yyyy format .I have to change it to dd/mm/yyyy format .
I have the code for date formatting conversion .
What my doubt is whether the code should be written inside the jsp page or in the javascript .
Thanks .Hi
<%@page language="java" import="java.sql.*,java.util.*,java.text.*" %>
<%SimpleDateFormat sdf= new SimpleDateFormat(dd/mm/yyyy );%>
<% java.util.Date temp_date = sdf.parse(PassYourDateHere); %>
use this with your jsp
Regards
Abhijith YS -
Prompt window Issues-resize and date format setting to 'mm/dd/yyyy' .
Guys,
I have two issues which needs to be solved for better reporting.
I am using url reporting approach to view reports in ActiveX viewer.
1) I have to set date format to 'mm/dd/yyyy' in parameter prompt window by default It is in yyyy-mm-dd format.
2) I have to make prompt window with full size screen in order to accommodate more than one date parameter and make it looks better.
Can any one tell me how to change and fix date format and resize Prompt window?
Should I open a ticket with business object in order to solve or customize the Crystal Report Server XI R2 configurations for us?
Please suggest me some probable options for it.
Sincerely,
Sanjay Patel
Edited by: Adlyd Joseph on Feb 3, 2009 7:22 AMHello Adlyd,
SAP Business Objects does not support customizing Infoview, CR Server, or BusinessObjects Enterprise. I'll post the content of SAP Business Objects Note 1218598 below that speaks to this. Even if they could help customize CR Server/Enterprise/Infoview there's no way to change the parameter prompting page. It's a page that is generated at runtime, and it isn't exposed to any of the BusinessObjects SDK.
If you want to see if SAP Business Objects can help you with the date format that might be possible. In North America you can call 1-800-877-2340, and select option 4, and then option 1.
You can also purchase technical support from the [Online Store|http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300].
Sincerely,
Dan Kelleher
NOTE: This Note was written for BOE XI and XI R2, but it applies to BOE XI 3.0 and 3.1 as well as all versions of CR Server since version XI (v11.0).
++++++++++++++++++
1218598 - Support policy on customizing BusinessObjects InfoView and other applications
Symptom
In previous versions of Business Objects products, Business Objects Customer Support had assisted customers with the customization of the ePortfolio and InfoView applications by providing guidance on what changes were required for simple and specific custom features.
What is the support policy for customizing BusinessObjects XI, XI Release 2, XI 3.0, XI 3.1 InfoView and the other included applications?
Resolution
Starting with BusinessObjects XI, code-level customization of InfoView and the other applications included with BusinessObjects XI is not supported and not recommended. These applications include Crystal Reports Explorer and the Central Management Console.
InfoView is a fully-featured product and can be customized by changing settings in the Central Management Console or by changing values in the application configuration files only.
Requests for custom features in InfoView or any other included applications will be treated either as enhancement requests, or in extreme cases, as product defects. Any feature that does not function as documented will be treated as a product defect.
Custom features may also be implemented as part of an Original Equipment Manufacturer (OEM) agreement, or by engaging Business Objects Consulting Services.
Background Information
Modification of any of the following file types in BusinessObjects InfoView XI, XI Release 2, XI 3.0, XI 3.1 is not supported:
.aspx
.cs
.vb
.ascx
.asax
.jsp
.java
.js
.htm
.html
.csp
See Also
For more information, please refer to the technical paper, [Customizing Look and Feel using the CMC and Style Sheets|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/209e174d-be3e-2b10-4d8e-e25a76a6fac1]. -
Changing date format in EP 5.0
Hi,
I am working on EP 5.0 on ITS Server .For designing GUI i am using HTMLB with jsp .
When i choose the date from date picker(calender in this case) it comes in the format mm/dd/yyyy . But the requirement is like when i choose date , on the screen it should appear in dd.mm.yyyy format .
Can anybody tell how to achive this .Whether i have to change the user settings in Portal or i have to change the code in JSP .If i can get the detailed procedure in how to do this then it would be more useful to me .
Thanks a lot .Hi Jain,
Refer the following links where the question has been answered.
Changing the date format in a HTMLB Input field component
/thread/33623 [original link is broken]
how can i change date format in portal?
Regards,
Tamil K -
Need help - Date format in es Tag / LoadedData
hi,
I have one Date attribute called 'EXPIRATION_DATE' in DOCUMENT table.
I mapped this column entry in 'application-config.xml' as jdbc.column.EXPIRATION_DATE=ExpirationDate;
And when I am trying to get this value in JSP,within '<es:forEachInArray>' tag
scope, using the syntax below
<%
String strDate = (String)doc.getProperty("LodedDate","ExpirationDate");
%>
I am getting different formatted results in different environments
Like , when I executed this in windows ,
I got the resulted string as "Mon Jul 07 00:00:00 EDT 2003" , which can be converted
to 'Date' type
using <% Date exp_date = new Date(strDate); %> which solves my problem.
But , when I executed same code to UNIX ,
I got the resulted string as "2009-02-01 00:00:00.0" , which is not convertible
to 'Date' format.
I got the following exception , when I try to convert this resulted String to
date format like.
<% Date exp_date = new Date(strDate); %>
java.lang.IllegalArgumentException
at java.util.Date.parse(Date.java:585)
at java.util.Date.<init>(Date.java:267)
Finally , I need to convert the resulted string to "MMM dd, yyyy" (Feb 22, 2000)format.
If not above method , what is the best way to get the resulted value in this "MMM
dd, yyyy" format.
/***** My Sample code ********/
<es:forEachInArray array="<%=BankerMsgs%>" id="doc" type="Content" >
<%String strDate = "";
strDate = (String)doc.getProperty("LodedDate","ExpirationDate"); //strDate =
"Mon Jul 07 00:00:00 EDT 2003"; // Windows
//strDate = "2003-07-07 00:00:00.0"; // UNIX
out.println("Original Date is :" + strDate); // In windows env I got this formatted
result 'Mon Jul 07 00:00:00 EDT 2003' and In UNIX I got the string as '2003-07-07
00:00:00.0'
SimpleDateFormat formatter = new SimpleDateFormat ("MMM dd, yyyy");
Date strDate12 = new Date(strDate);
String strExpDate = "";
try
strExpDate = formatter.format(strDate12);
out.println("Formatted Date is :" + strExpDate); // in windows I got correct
result as 'Jul 07, 2003' and in UNIX java.lang.IllegalArgumentException
catch(Exception e) {}
%>
</es:forEachInArray>
Any help will be much appreciated.
thanks
-Amar Purumandlahi,
I have one Date attribute called 'EXPIRATION_DATE' in DOCUMENT table.
I mapped this column entry in 'application-config.xml' as jdbc.column.EXPIRATION_DATE=ExpirationDate;
And when I am trying to get this value in JSP,within '<es:forEachInArray>' tag
scope, using the syntax below
<%
String strDate = (String)doc.getProperty("LodedDate","ExpirationDate");
%>
I am getting different formatted results in different environments
Like , when I executed this in windows ,
I got the resulted string as "Mon Jul 07 00:00:00 EDT 2003" , which can be converted
to 'Date' type
using <% Date exp_date = new Date(strDate); %> which solves my problem.
But , when I executed same code to UNIX ,
I got the resulted string as "2009-02-01 00:00:00.0" , which is not convertible
to 'Date' format.
I got the following exception , when I try to convert this resulted String to
date format like.
<% Date exp_date = new Date(strDate); %>
java.lang.IllegalArgumentException
at java.util.Date.parse(Date.java:585)
at java.util.Date.<init>(Date.java:267)
Finally , I need to convert the resulted string to "MMM dd, yyyy" (Feb 22, 2000)format.
If not above method , what is the best way to get the resulted value in this "MMM
dd, yyyy" format.
/***** My Sample code ********/
<es:forEachInArray array="<%=BankerMsgs%>" id="doc" type="Content" >
<%String strDate = "";
strDate = (String)doc.getProperty("LodedDate","ExpirationDate"); //strDate =
"Mon Jul 07 00:00:00 EDT 2003"; // Windows
//strDate = "2003-07-07 00:00:00.0"; // UNIX
out.println("Original Date is :" + strDate); // In windows env I got this formatted
result 'Mon Jul 07 00:00:00 EDT 2003' and In UNIX I got the string as '2003-07-07
00:00:00.0'
SimpleDateFormat formatter = new SimpleDateFormat ("MMM dd, yyyy");
Date strDate12 = new Date(strDate);
String strExpDate = "";
try
strExpDate = formatter.format(strDate12);
out.println("Formatted Date is :" + strExpDate); // in windows I got correct
result as 'Jul 07, 2003' and in UNIX java.lang.IllegalArgumentException
catch(Exception e) {}
%>
</es:forEachInArray>
Any help will be much appreciated.
thanks
-Amar Purumandla -
Date Format Picture ends before converting entire input string..
Hi all
i am creating a report in 10g.. in which i want to convert Emp_lump_sum (number) to character .I have created a formula column in which i have written a function in the formula column and assign that formula column to the text field in which i want the result.
when the report run i get the following error....
ORA-01830: date format picture ends before converting entire input string..
i have tried with a attribute EMP_NO (Varchar2(30)), it shows the result but when i add EMP_LUMP_SUM (NUMBER) , it show the above error. on the database side i get the same error.
Database : 11g
OS : Windows server 2003
reports : 10g
any help will be thankful..
Function i wrote behind the formula coloumn is..
function CF_1Formula return CHAR is
xy varchar2(100);
begin
select to_char(to_date(emp_lump_sum,'j'),'jsp') into xy from fms_111_form4_tr;
return xy;
--xy := f_19;
end;Hello:
Try to use a database function and call it from reports.
Regards, -
Hi Tim,
I am facing some issues with formatting the date using XMLP. The following is the sample XML data file i am using:
<LIST_G_HEADER>
<G_HEADER>
<QUOTE_HEADER_ID>1455</QUOTE_HEADER_ID>
<QUOTE_NUMBER>2027</QUOTE_NUMBER>
<QUOTE_VERSION>1</QUOTE_VERSION>
<QUOTE_NAME>Test GM Report - Rabindra</QUOTE_NAME>
<SOURCE_NAME>Fletcher, MR. Paul</SOURCE_NAME>
<QUOTE_DATE>27-OCT-2005</QUOTE_DATE>
<CURRENCY_CODE>GBP</CURRENCY_CODE>
</G_HEADER>
</LIST_G_HEADER>
The formatting i use for my date field i.e <QUOTE_DATE>, ends up either with NO formatting or giving me an error "[010906_114656657][][ERROR] Invalid XSD string: 27-OCT-2005 (XMLP Template Viewer)". The default formatting available with the form field dialog box (MS-Word) feature also doesn't work.
I have the following formatting for this field in the form field:
<?format-date:QUOTE_DATE; 'MEDIUM' ?>
When i read the user guide, it reads that the date should be in the canonical format i.e: YYY-MM-DDThh:mm:ss+HH:MM
However i am not getting the date from the base table's in this format. Is the error happening due to incorrect format or is there some other reason behind this? Please let me know, how can i overcome this issue.
Thx,
NitinAs i mentioned in another thread
substring function and date format
Please use this standards
<?xdofx:expression?>
for extended SQL functions or
<?xdoxslt:expression?>
for extended XSL functions.
Use like
<?xdofx:rpad(LAST_NAME),30, ’x’)?>
<?xdofx:Instr(’abcabcabc’,’a’,2))?>
<?xdofx:upper(char)?>
<?xdofx:lower (char)?>
<?xdofx:greatest ( expr [, expr]... )?>
ETC.....
Maybe you are looking for
-
Error Running a Page in Jdeveloper through VPN
I am having an issue running a Hello World Page in JDeveloper9i through VPN. When I try to run a page, web browser is trying to open the page based on the Host Name or IP Address used to refer to Embedded OC4J. It would be really great if you could h
-
I'm trying to use speech recognition to input text on my iMac running the latest mountain lion, 10.8.3. I have sticky keys enabled. When I try to start speaking by pressing the function key twice nothing happens. I can only get it to work if I disabl
-
Camera RAW: NEF - JPG color dessaster
Hallo... I use PS CS4 on my Mac. Normally I use Camera RAW to convert my D90 NEF-files to JPG-files without using Photoshop. In Camera RAW look all colors great. When I convert the 12Bit-Raw-files to 8Bit-JPG's all colors look sad and gray. Where is
-
UPGRADE/DEPLOYMENT_BASED_UPGRADE/DEPLOY_ONLINE_DEPL
hi Friends An error has occurred during the execution of the DEPLOY_ONLINE_DEPL phase. Error while executing DeploymentManager phase with action deploySlot. Check the log files for the specified action. Could not execute deployment of stack file D:/S
-
Problem: When using multiple instances of a FLV player in a FLA AS3 and when one navigates to another frame the video still plays from the earlier frames as one can still hear it... I tried to implement loading a "phantom-light" FLV on the frame chan