Date formatting question

I'm trying to achieve something like the following:
<c:forEach items="${INCIDENTS}" var="incident">
    Message Received: <fmt:formatDate value="${incident.timeStamp}" type="both" timeStyle="long" dateStyle="long" /></p>
</c:forEach>The problem is I get an error message saying "According to TLD or attribute directive in tag file, attribute value does not accept any expressions"
Can anyone help and tell me what I'm doing wrong? I'm guessing that it can't resolve incident.timeStamp and that this needs to be supplied in some other way to the function, but I can't find out how!
Thanks
Message was edited by: incidently, timeStamp is a java.util.Date
andrewl41

Ok, I've found the problem. I was using
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
instead of
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
Apparently using the JSTL1.0 taglib in a JSP2.0 container.
Thanks

Similar Messages

  • SQL Date Format question

    Hello,
    The date format in an Access database is "Date Time" (
    1/8/2008 6:14:34
    AM ). It's a required format for some functions.
    I need to group product orders by date for a simple revenue
    summary page.
    As the time part of the date is different for all orders,
    trying to group
    all orders by one date ( 1/8/2008 for example ) won't work.
    It results in:
    1/8/2008 6:14:34 AM $30.00
    1/8/2008 7:50:23 AM $20.00
    I need it to be:
    1/8/2008 $50.00
    I've tried convert and datetime but am having some kind of
    brain cramp I
    think and can't get it to work.
    The base SQL is:
    SELECT order_Date, Sum(order_Total) as TotalAmt FROM
    OrderDetails
    GROUP BY order_Date
    Usage:
    <% While ((Repeat1__numRows <> 0) AND (NOT
    Recordset1.EOF)) %>
    <td><%= Recordset1("order_Date") %></td>
    <td><%= Recordset1("TotalAmt") %></td>
    Repeat1__index=Repeat1__index+1
    Repeat1__numRows=Repeat1__numRows-1
    Recordset1.MoveNext()
    Wend
    %>
    Any ideas are appreciated.
    Take care,
    Tim
    Take care,
    Tim
    www.bestbabystuffonline.com

    Hi Baxter,
    I will be summing the totals, but I haven't added that yet.
    The date format was the big hurdle.
    I just have to figure out how to format the date back to
    mm/dd/yyy in the
    repeat region on the page now.
    It's coming out of the rs as yyyy/mm/dd
    <%=Recordset1("orderDate")%>
    I'm thinking I'll need to set up a function to format the way
    orderDate
    displays.
    <%=FriendlyDate(Recordset1("orderDate"))%>
    But, time for a break. Thanks again for the ideas.
    Take care,
    Tim
    "Baxter" <baxter(RemoveThe :-)@gtlakes.com> wrote in
    message
    news:[email protected]...
    >I also thought that you were Summing the totals from the
    order that the
    >item
    > was placed at a different time or is the sum the total
    from just one time
    > stamp?
    > SELECT order_Date, Sum(order_Total) as TotalAmt FROM
    OrderDetails
    > GROUP BY order_Date
    >
    > "TC2112" <[email protected]> wrote in message
    > news:[email protected]...
    >> I got it to group and order correctly with this:
    >>
    >> "SELECT FORMAT(order_Date, 'yyyy/mm/dd') AS
    OrderDate FROM
    > cwq_OrderDetails2
    >> GROUP BY FORMAT(order_Date, 'yyyy/mm/dd') ORDER BY
    FORMAT(order_Date,
    >> 'yyyy/mm/dd') DESC"
    >>
    >> All three had to have the same format (there was the
    brain cramp).
    >>
    >> It takes this data:
    >>
    >> 1/8/2008 6:14:34 AM
    >> 1/8/2008 7:50:23 AM
    >> 1/10/2008 8:50 AM
    >> 1/9/2008 9:01 AM
    >>
    >> and shows it in the recordset as:
    >>
    >> 2008/01/10
    >> 2008/01/09
    >> 2008/01/08
    >>
    >>
    >> Which is perfect. It's gouped and ordered
    descending..
    >>
    >> Now all I need to do is change the display format on
    the page to
    > mm/dd/yyyy
    >> here:
    >>
    >>
    >> <%=Recordset1("orderDate")%>
    >>
    >> Thanks again,
    >>
    >> Tim
    >>
    >>
    >> "Baxter" <baxter(RemoveThe :-)@gtlakes.com>
    wrote in message
    >> news:[email protected]...
    >> > Do you have a order_number field in the
    database you could
    >> > GROUP BY order_number
    >> > Dave
    >> > "TC2112" <[email protected]> wrote in
    message
    >> > news:[email protected]...
    >> >> Hi Baxter,
    >> >>
    >> >> That allows for the correct format to be
    displayed, but it's the
    >> >> format
    >> >> in
    >> >> the recordset that needs to be set at just
    the date so it can be
    > grouped.
    >> >>
    >> >> I'm pretty close with this:
    >> >>
    >> >> "SELECT FORMAT(order_Date, 'mm/dd/yyyy') AS
    OrderDate FROM
    >> >> tblOrderDetails
    >> >> ORDER BY FORMAT(order_Date, 'yyyy/mm/dd')
    DESC"
    >> >>
    >> >> It returns
    >> >>
    >> >> 1/10/2008
    >> >> 1/9/2008
    >> >> 1/8/2008
    >> >> 1/8/2008
    >> >> 1/8/2008
    >> >>
    >> >>
    >> >> Now I just need to figure out the GROUP BY
    in the SQL to return this:
    >> >>
    >> >> 1/10/2008
    >> >> 1/9/2008
    >> >> 1/8/2008
    >> >>
    >> >> GROUP BY order_Date doesn't work as
    order_date in the DB contains the
    >> >> minutes.
    >> >> GROUP BY FORMAT(order_Date, 'mm/dd/yyyy')
    throws an error.
    >> >>
    >> >> Thanks for the ideas :-)
    >> >>
    >> >> Tim
    >> >>
    >> >>
    >> >>
    >> >>
    >> >> "Baxter" <baxter(RemoveThe
    :-)@gtlakes.com> wrote in message
    >> >> news:[email protected]...
    >> >> > Try this, open the Bindings panel and
    select the date field in the
    >> >> > recordset
    >> >> > then to the right
    >> >> > of the panel you will see a column
    header called format on the right
    >> > side
    >> >> > of
    >> >> > the panel ( if you cant see it expand
    the panel box) click the
    > dropdown
    >> >> > arrow and pick the date format you
    want to display on the page from
    > the
    >> >> > Date/Time selections.. Hope this helps
    you.
    >> >> > Dave
    >> >> >
    >> >> > "TC2112" <[email protected]>
    wrote in message
    >> >> >
    news:[email protected]...
    >> >> >> Hi Baxter,
    >> >> >>
    >> >> >> I need to keep the current Date
    Time format in the database table
    >> >> >> as
    >> > some
    >> >> >> other functions need the long
    format.
    >> >> >>
    >> >> >> I'm just trying to format to short
    date in the recordset so I can
    >> >> >> group
    >> >> >> by
    >> >> >> it and have any orders, regardless
    of time, group in a single date.
    >> >> >>
    >> >> >> Thanks,
    >> >> >> Tim
    >> >> >>
    >> >> >> "Baxter" <baxter(RemoveThe
    :-)@gtlakes.com> wrote in message
    >> >> >>
    news:[email protected]...
    >> >> >> > In your order_Date field in
    the database design view set the
    > format
    >> > to
    >> >> >> > Short
    >> >> >> > Date Default Value Now()
    >> >> >> > That should work for you.
    >> >> >> > Dave
    >> >> >> > "TC2112"
    <[email protected]> wrote in message
    >> >> >> >
    news:[email protected]...
    >> >> >> >> Hello,
    >> >> >> >>
    >> >> >> >> The date format in an
    Access database is "Date Time" ( 1/8/2008
    >> >> >> >> 6:14:34
    >> >> >> >> AM ). It's a required
    format for some functions.
    >> >> >> >>
    >> >> >> >> I need to group product
    orders by date for a simple revenue
    > summary
    >> >> > page.
    >> >> >> >> As the time part of the
    date is different for all orders, trying
    > to
    >> >> > group
    >> >> >> >> all orders by one date (
    1/8/2008 for example ) won't work.
    >> >> >> >> It results in:
    >> >> >> >>
    >> >> >> >> 1/8/2008 6:14:34 AM
    $30.00
    >> >> >> >> 1/8/2008 7:50:23 AM
    $20.00
    >> >> >> >>
    >> >> >> >> I need it to be:
    >> >> >> >>
    >> >> >> >> 1/8/2008 $50.00
    >> >> >> >>
    >> >> >> >> I've tried convert and
    datetime but am having some kind of brain
    >> > cramp
    >> >> > I
    >> >> >> >> think and can't get it to
    work.
    >> >> >> >>
    >> >> >> >> The base SQL is:
    >> >> >> >>
    >> >> >> >> SELECT order_Date,
    Sum(order_Total) as TotalAmt FROM
    >> >> >> >> OrderDetails
    >> >> >> >> GROUP BY order_Date
    >> >> >> >>
    >> >> >> >> Usage:
    >> >> >> >>
    >> >> >> >> <% While
    ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF)) %>
    >> >> >> >>
    >> >> >> >> <td><%=
    Recordset1("order_Date") %></td>
    >> >> >> >> <td><%=
    Recordset1("TotalAmt") %></td>
    >> >> >> >>
    >> >> >> >>
    Repeat1__index=Repeat1__index+1
    >> >> >> >>
    Repeat1__numRows=Repeat1__numRows-1
    >> >> >> >> Recordset1.MoveNext()
    >> >> >> >> Wend
    >> >> >> >> %>
    >> >> >> >>
    >> >> >> >>
    >> >> >> >>
    >> >> >> >> Any ideas are
    appreciated.
    >> >> >> >>
    >> >> >> >> Take care,
    >> >> >> >> Tim
    >> >> >> >>
    >> >> >> >>
    >> >> >> >> --
    >> >> >> >> Take care,
    >> >> >> >>
    >> >> >> >> Tim
    >> >> >> >>
    >> >> >> >>
    www.bestbabystuffonline.com
    >> >> >> >>
    >> >> >> >>
    >> >> >> >
    >> >> >> >
    >> >> >>
    >> >> >>
    >> >> >
    >> >> >
    >> >>
    >> >>
    >> >
    >> >
    >>
    >>
    >
    >

  • Business One date format question

    Hi,
    Business One formats dates coming out of the database as specified by the user.  But it looks like, when you set a date variable in your program code to the value coming out of the database and you set an edit text value to that variable, Business One doesn't format it.  Am I right?  I have a solution but I just want to make sure that there isn't something I'm missing.  I'm using VB .NET 2005.
    Thanks,
    Mike
    Edited by: Mike Angelastro on Jan 21, 2010 12:44 PM

    Vasu,
    Thanks for your suggestion.  I followed it but it doesn't seem to work.  The format appears to be more consistent with the machine's data format instead of what was specified in the general settings.  Here is my code:
    oDetailForm.DataSources.UserDataSources.Add("dsDueDate", SAPbouiCOM.BoDataType.dt_DATE)
    oEditText.DataBind.SetBound(True, , "dsDueDate")
    If Year(DueDate) > 1901 Then
             oEditText.Value = DueDate  'Format(DueDate, SystemDateFormat)
    Else
             oEditText.Value = "N/A"
    End If
    Is my code correct?
    Thanks again,
    Mike

  • JFileChooser and date format questions

    I have a JFileChooser that currently works - I set the default directory and allow the user to select a file or enter a file name.
    I have been asked to modify this to prepopulate the file name field on the JFileChooser.
    How do I do that? It is not obvious which method to call to set the filename field.
    Also, the file name needs to be a timestamp "*yyyyMMddHHmmss*.dat"
    I tried creating the timestamp part with the following code, but it does not format as expected.
            String s = "";
            SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddddHHmmss");
            try
                java.util.Date now = new java.util.Date();
                java.util.Date dat = dateFormat.parse( now.toString() );
                s = dat.toString();
            }What is wrong with this?
    Thanks.

    I don't do Swing and this is also not the subforum for Swing questions. It has its own subforum.

  • Time Zone Offset - Date Format question

    I'm wondering if any one knows how to display the time zone offset of a date in the following format "[+-]HH:mm." More so... I need the date/time in the ISO 8601 format "yyyy-MM-dd'T'HH:mm:ss[+-]HH:mm", where the last [+-]HH:mm is the hour representation of the offset. Here's some sample code...
    SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
    Calendar rightnow= Calendar.getInstance();
    // So if system date/time is February 14, 2002 at 1:15:00 PM EST, this would produce "2002-02-14T13:15:00"
    System.out.println("Current Datetime" + sdf1.format rightnow.getTime());
    How can I get the timezone offset appended to my output in a [+-]HH:mm format. So, the above date needs to look like "2002-02-14T13:15:00-05:00". I can get the offset in milliseconds by doing the following:
    int offset1 = rightnow.get(rightnow.ZONE_OFFSET) + rightnow.get(rightnow.DST_OFFSET);
    But how can you get this representation into the [+-]HH:mm format?
    thanks in advance,
    stophman

    Try something like this:import java.text.* ;
    import java.util.* ;
    static public String formatISO8601(Calendar cal) {
         * create ISO 8601 formatter for Calendar objects
        MessageFormat iso8601 = new MessageFormat("{0,time}{1,number,+00;-00}:{2,number,00}") ;
        // need to shove a date formatter that is cognizant of the
        // calendar's time zone into the message formatter
        DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss") ;
        df.setTimeZone(cal.getTimeZone()) ;
        iso8601.setFormat(0, df) ;
         * calculate the time zone offset from UTC in hours and minutes at the current time
        long zoneOff = cal.get(Calendar.ZONE_OFFSET) + cal.get(Calendar.DST_OFFSET) ;
        zoneOff /= 60000L ;  // in minutes
        int zoneHrs = (int) (zoneOff / 60L) ;
        int zoneMins = (int) (zoneOff % 60L) ;
        if (zoneMins < 0) zoneMins = -zoneMins ;
        return (iso8601.format(new Object[] {
                                    cal.getTime(),
                                    new Integer(zoneHrs),
                                    new Integer(zoneMins)
    }

  • Xquery date formatting question

    We are experiencing strange behavior of some xquery functions. I am wondering we are doing something wrong or that there is a bug in the xquery functions.
    When we execute the following xquery:
    fn:current-dateTime()
    it returns:
    2007-01-30T[b]09:51:24.843+01:00
    and when we execute the below xquery
    fn-bea:dateTime-to-string-with-format("yyyyMMddkkmmssSSS",fn:current-dateTime())
    it returns:
    20070130[b]085053645In this example the shocking part is the underlinded/bold part, ie the hour of the day. When we use the first query it returns the correct time and when we use the xquery to also format the current-dateTime it returns the current time minus one hour.
    Does anyone have an idea whether we are doing something wrong?

    You should use getDate() to retrieve your date value from the ResultSet as a java.sql.Date object.
    Then use a SimpleDateFormat in the JSP to format your date.

  • Data format question

    I am using the following code to convert today to a string.
    java.util.Date today = new java.util.Date();
         String currDate;
         Locale currentLocale =new Locale("en","US");
         DateFormat dateFormatter = DateFormat.getDateInstance(DateFormat.SHORT, currentLocale);
    currDate = dateFormatter.format(today);
         System.out.println(" --     the sys date = " + currDate);
    It gives me 6/25/03. But what I need is 06/25/2003. Does anyone know how I can get 06/25/2003 format?
    Thanks,
    aloe9451

    >
    java.util.Date today = new java.util.Date();
         String currDate;
         Locale currentLocale =new Locale("en","US");
    DateFormat dateFormatter =
    er = DateFormat.getDateInstance(DateFormat.SHORT,
    currentLocale);Instead of DateFormat use SimpleDateFormat , i mean ..
    "SimpleDateFormat in the package java.text.*;" ..
    you can pass a pattern in this way..
    SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy");
    currDate = formatter.format(today)
    try .. the System.out. of currDate ... and then you'll see what you wanted
    Sorry my english!!

  • Yet another string to date format  question

    I have searched the forums and cannot find the exact answer I am looking for so here goes.
    SimpleDateFormat sdf = new SimpleDateFormat("M/d/y");
    String strDate = "02/25/04";
    Date myDate = sdf.parse(strDate);
    gives me : Wed Feb 25 00:00:00 EST 2004
    but I need the output of myDate to stay 02/25/04 in order to add the date object to a sql query.
    strDate will come from request.getParameter variable.
    Any help would be greatly appreciated.

    >
    This will only work if I return the value as a string,
    which puts me back right where I started. I simply
    cannot get the formatted value Wed Feb 25 00:00:00 EST
    2004 to return as a Date object 02/25/04. Is this
    possible? When using SQL, as stated above use a PreparedStatement.
    Use the setDate/setTimestamp/setTime methods to put it into the database.
    Use getDate/getTimestamp/getTime to get it out.
    The 'Date' classes do NOT store anything as "02/25/04". They store milliseconds since the epoch in UMT (Universal Mean Time = Greenwich Mean Time.) That is all they store.
    When you display a 'Date' instance it is converted to a display format. You can use SimpleDateFormat to create any display format that you want.

  • Date Format Question - calling a store procedure from java side

    What is the best approach to handle a DATE as an IN parameter to a procedure?
    1) emp table has a column called hire_date and its data type is DATE;
    2) the procedure tried to retrieve all employees hired on a specific date, so there will be an IN parameter called p_hire_date, what data type should it use? Something like p_hire_date          IN     emp.HIRE_Date%TYPE? <== is this correct?
    3) so inside the procedure body, when retrieving the record,
    SELECT first_name, last_name
    FROM EMP
    Where hire_date = p_hire_date <==is this correct? or when do I use to_date()?
    4) On the Java side, when calling this procedure, what data type should the hire_date use?
    Thanks,
    new2Oracle

    new2Oracle wrote:
    it seems our java team passed the hire_date as a string, so in this case, i should make the following change
    1) p_hire_date IN varchar2
    2) in the SELECT statement, it will be like
    select fname, lname
    from emp
    where hire_date = to_date(p_hire_date, 'MM/DD/YYYY') <== the hire date is stored in the table as 1/1/2005
    Would the change above work?
    Thanks,Yes it would , but:
    if it was 01/03 is this jan 3rd, or mar 1st
    Bets way is to pass in to parameters
    p_hire_date=>1/1/2005
    p_date_format=>'mm/dd/yyyy';
    then your code can say in initialisation section
    v_hire_date varchar2(30)  := to_date(p_hire-date,p_date_format);and no more conversions in your code.
    select fname, lname
    from emp
    where hire_date = v_hire_date;Much clearer this way, I think.

  • Date format question....

    Hi,
    How can i convert string '2008-02-11' to string '11-Feb-2008'?
    Thanks,

    Using pl/sql in this will be most straight forward.
    --Mukul                                                                                                                                                                                                   

  • Question about get web service result in actionscript and convert data format

    Hi, All
    I have question about how to get dataset from web services
    and put it in tree structure. I have 2 questions about this:
    1, How can I get data correctly in actionscript?
    I have no problem to get data by
    <mx:ArrayCollection id="acFolder"
    source="{mx.utils.ArrayUtil.toArray(MyGServices.getFolder.lastResult)}"
    />
    And display in datagrid.
    But when I try to use
    public function
    handleFolderContents(event:mx.rpc.events.ResultEvent):void{
    arData=mx.utils.ArrayUtil.toArray(event.result);
    acData=new ArrayCollection(arData);
    input.text=acData.getItemAt(0).id;
    Seems I can’t get data, it always say:
    TypeError: Error #1009: Cannot access a property or method of
    a null object reference.
    2, how to convert data format
    I get data from web service and want to convert it to tree
    structure, as mention below:
    I get:
    <Array>
    <id>111</id>
    <Name>Production1</Name>
    </Array>
    <Array>
    <id>222</id>
    <Name>Production2</Name>
    </Array>
    Convert to:
    <mx:XMLList id="treeData">
    <node>
    <node label="Production1" data="111">
    <node label="Production2" data="222"/>
    </node>
    </node>
    </mx:XMLList>
    Please help me.
    Thanks.

    First, don't specify the package path in the argument
    declaration. Instead import the event object:
    import mx.rpc.events.ResultEvent;
    The docs state this emphatically.
    Second, try "lastResult", in place of "result":
    arData=mx.utils.ArrayUtil.toArray(event.lastResult); // I am
    not positive about this. I maybe recall reading that result was ok
    for the event object, but maybe not.
    Finally, why do you want to convert the xml? You certainly
    could, but it would be a manual process, recursively reading the
    existing xml nodes and building the new structure, but again, why?
    Just use a labelFunction if necessary to display the nodes as
    you wish.
    Tracy

  • OAF changes Date Format

    Hi
    I need to store a date into a flexfield. We have enabled the Flexfield and there is NO value set attached to it.
    This attribute is already in the VO as a varchar, so we have just added a new column into the page as data type Date and link it to the flexfield column.
    In this page we have a table layout so the user can enter 10 rows before saving them. And this page it just used to punch data into a table, which means, once the user press apply the page saves and clears. The user can not query on that page.
    When entering the first row, we can open the Date picker and we can choose the date and then it populates the column as “DD-MON-YYYY”.
    The problem is:
    When we entering the second row after entering one column the pages changes the format of my date from the previous record to “YYYY-MM-DD”, then after entering any second column the pages clear the date from the previous row.
    Running the page from JDev it shows the following message before clears the flexfield:
    java.text.ParseException: 2011-01-28
    Note we have not extended the VO and not extended the controller.
    My questions are:
    1) Why the Self-Service is change the date format to YYYY-MM-DD even if the profile ICX: Date Format Mask (31-DEC-1999) and my preference is set to DD-MON-YYYY?
    2) How can I avoid this to happen? Is there any way to keep my date as DD-MON-YYYY?
    Thanks,
    Alex

    Alex,
    That was the update from Oracle support, when we raised it,
    But I did the following to handle that, I feel this is not the right way, since we had that issue as SEV1, I did that as a workaround,
    Check this this might help.
    package oracle.apps.xxper.selfservice.appraisals.webui;
    import com.sun.java.util.collections.HashMap;
    import java.io.Serializable;
    import oracle.apps.fnd.common.VersionInfo;
    import oracle.apps.fnd.framework.OAApplicationModule;
    import oracle.apps.fnd.framework.OAException;
    import oracle.apps.fnd.framework.webui.*;
    import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    import oracle.apps.fnd.framework.webui.beans.form.OASubmitButtonBean;
    import oracle.apps.fnd.framework.webui.beans.message.OAMessageCheckBoxBean;
    import oracle.apps.per.selfservice.appraisals.ApprConstants;
    import oracle.apps.per.selfservice.arch.webui.PerOAControllerImpl;
    import oracle.apps.per.selfservice.common.webui.CommonCO;
    import oracle.apps.per.selfservice.compgaps.Constants;
    import oracle.apps.per.selfservice.appraisals.webui.MAFinalRatingsPageCO;
    import oracle.apps.fnd.framework.server.OADBTransaction;
    import oracle.apps.fnd.framework.OAViewObject;
    import java.sql.CallableStatement;
    import java.sql.ResultSet;
    import oracle.jbo.Row;
    import oracle.apps.fnd.framework.webui.beans.message.OAMessageDateFieldBean;
    import oracle.apps.per.selfservice.appraisals.server.AppraisalVORowImpl;
    public class XXPERMAFinalRatingsPageCO extends MAFinalRatingsPageCO
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    writeLog("XXPER",pageContext,"Start PR XXPERMAFinalRatingsPageCO ");
    OAMessageDateFieldBean dateBean =(OAMessageDateFieldBean) webBean.findChildRecursive("DeliveryDateTime");
    if(dateBean !=null )
    String dateBeanValue = (String) dateBean.getValue(pageContext) ;
    writeLog("XXPER",pageContext,"dateBean Value "+dateBeanValue);
    if(dateBeanValue !=null)
    if(dateBeanValue.indexOf(".0") !=-1)
    dateBeanValue = dateBeanValue.substring(0,dateBeanValue.length()-2);
    writeLog("XXPER",pageContext,"dateBean Updated Value "+dateBeanValue);
    String dateMaskQry = "SELECT value FROM V$NLS_Parameters WHERE parameter ='NLS_DATE_FORMAT'";
    writeLog("XXPER",pageContext,"dateMaskQry "+dateMaskQry);
    String dateMask = (String) executeSql(dateMaskQry, pageContext, webBean);
    writeLog("XXPER",pageContext,"dateMask : "+dateMask);
    String dateConvertQry = "select to_char(fnd_date.canonical_to_date('"+dateBeanValue+"') ,'"+dateMask+" HH24:MI:SS') from dual";
    writeLog("XXPER",pageContext,"dateConvertQry "+dateConvertQry);
    String convertedDateValue = (String) executeSql(dateConvertQry,pageContext,webBean);
    writeLog("XXPER",pageContext,"convertedDateValue "+convertedDateValue);
    if(convertedDateValue == null )
    convertedDateValue = dateBeanValue;
    dateBean.setValue(pageContext,convertedDateValue);
    writeLog("XXPER",pageContext,"After set the value "+convertedDateValue);
    setAttribute3(pageContext, convertedDateValue);
    writeLog("XXPER",pageContext,"After set the VO value "+convertedDateValue);
    }else
    writeLog("XXPER",pageContext,"dateBean value is null from the bean Get the value from getAttribute3() method");
    dateBeanValue = getAttribute3(pageContext);
    dateBean.setValue(pageContext,dateBeanValue);
    }else
    writeLog("XXPER",pageContext,"dateBean is null ");
    writeLog("XXPER",pageContext,"End PR XXPERMAFinalRatingsPageCO ");
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    writeLog("XXPER",pageContext,"Start PFR XXPERMAFinalRatingsPageCO ");
    writeLog("XXPER",pageContext,"Event Param "+pageContext.getParameter(EVENT_PARAM));
    OAMessageDateFieldBean dateBean =(OAMessageDateFieldBean) webBean.findChildRecursive("DeliveryDateTime");
    if(dateBean !=null )
    String dateBeanValue = (String) dateBean.getValue(pageContext) ;
    if(dateBeanValue !=null)
    if(dateBeanValue.indexOf(".0") !=-1)
    dateBeanValue = dateBeanValue.substring(0,dateBeanValue.length()-2);
    writeLog("XXPER",pageContext,"dateBean Updated Value "+dateBeanValue);
    String dateMaskQry = "SELECT value FROM V$NLS_Parameters WHERE parameter ='NLS_DATE_FORMAT'";
    writeLog("XXPER",pageContext,"dateMaskQry "+dateMaskQry);
    String dateMask = (String) executeSql(dateMaskQry, pageContext, webBean);
    writeLog("XXPER",pageContext,"dateMask : "+dateMask);
    String dateConvertQry = "select to_char(fnd_date.canonical_to_date('"+dateBeanValue+"') ,'"+dateMask+" HH24:MI:SS') from dual";
    //String dateConvertQry = "select fnd_date.string_to_canonical('"+dateBeanValue+"','"+dateMask+" HH24:MI:SS') from dual";
    writeLog("XXPER",pageContext,"dateConvertQry "+dateConvertQry);
    String convertedDateValue = (String) executeSql(dateConvertQry,pageContext,webBean);
    writeLog("XXPER",pageContext,"convertedDateValue "+convertedDateValue);
    if(convertedDateValue == null )
    convertedDateValue = dateBeanValue;
    dateBean.setValue(pageContext,convertedDateValue);
    writeLog("XXPER",pageContext,"After set the value "+convertedDateValue);
    setAttribute3(pageContext, convertedDateValue);
    writeLog("XXPER",pageContext,"After set the VO value "+convertedDateValue);
    }else
    writeLog("XXPER",pageContext,"dateBean is null ");
    writeLog("XXPER",pageContext,"End PFR XXPERMAFinalRatingsPageCO ");
    super.processFormRequest(pageContext, webBean);
    writeLog("XXPER",pageContext,"End PFR XXPERMAFinalRatingsPageCO (After Super Call )");
    public void writeLog(String moduleName, OAPageContext pageContext, String diagText)
    if(pageContext.isLoggingEnabled(OAWebBeanConstants.STATEMENT))
    System.out.println(moduleName+" : "+diagText);
    pageContext.writeDiagnostics(moduleName,diagText,OAWebBeanConstants.STATEMENT);
    * Method to execute SQL.
    public Object executeSql(String pSqlStmt, OAPageContext pageContext , OAWebBean webBean)
    OADBTransaction tx = pageContext.getApplicationModule(webBean).getOADBTransaction();// (OADBTransaction)getOADBTransaction();
    Object lObject = null;
    // Create the callable statement
    CallableStatement lCstmt = (CallableStatement)tx.createCallableStatement(pSqlStmt, 1);
    ResultSet rs = null;
    try
    rs = lCstmt.executeQuery();
    while(rs.next())
    lObject = rs.getObject(1);
    catch (Exception e)
    //throw OAException.wrapperException(e);
    finally
    try {
    if(rs!=null)
    rs.close();
    if(lCstmt != null)
    lCstmt.close();
    catch(Exception e) {
    throw OAException.wrapperException(e);
    return lObject;
    } // executeSql
    public void setAttribute3(OAPageContext pageContext, String dateValue)
    OAApplicationModule rootAM = pageContext.getRootApplicationModule();
    OAApplicationModule apprAM = (OAApplicationModule)rootAM.findApplicationModule("AppraisalsAM");
    OAViewObject appraisalVO = (OAViewObject)apprAM.findViewObject("AppraisalVO");
    writeLog("XXPER",pageContext,"appraisalVO "+appraisalVO);
    if(appraisalVO !=null)
    AppraisalVORowImpl appraisalVORow = (AppraisalVORowImpl) appraisalVO.getCurrentRow();
    if(appraisalVORow !=null)
    int attrCount = appraisalVO.getAttributeCount();
    writeLog("XXPER",pageContext,"Attrbuute count "+attrCount);
    String[] attributeNames = appraisalVORow.getAttributeNames();
    appraisalVORow.setAttribute3(dateValue);
    public String getAttribute3(OAPageContext pageContext)
    OAApplicationModule rootAM = pageContext.getRootApplicationModule();
    OAApplicationModule apprAM = (OAApplicationModule)rootAM.findApplicationModule("AppraisalsAM");
    String attribute3Value = "N";
    OAViewObject appraisalVO = (OAViewObject)apprAM.findViewObject("AppraisalVO");
    writeLog("XXPER",pageContext,"appraisalVO "+appraisalVO);
    if(appraisalVO !=null)
    AppraisalVORowImpl appraisalVORow = (AppraisalVORowImpl) appraisalVO.getCurrentRow();
    if(appraisalVORow !=null)
    int attrCount = appraisalVO.getAttributeCount();
    writeLog("XXPER",pageContext,"Attrbuute count "+attrCount);
    String[] attributeNames = appraisalVORow.getAttributeNames();
    writeLog("XXPER",pageContext," AppraisalId :- "+ appraisalVORow.getAppraisalId());
    attribute3Value = (String)appraisalVORow.getAttribute3();
    String attribute1Value = (String)appraisalVORow.getAttribute1();//getAttribute2
    String attribute2Value = (String)appraisalVORow.getAttribute2();
    writeLog("XXPER",pageContext," attribute3Value :- "+attribute3Value + " attribute1Value "+ attribute1Value +"attribute2Value "+attribute2Value);
    }else
    writeLog("XXPER",pageContext," appraisalVORow is null ");
    }else
    writeLog("XXPER",pageContext," appraisalVO is null ");
    return attribute3Value;
    }

  • ORA-01821: date format not recognized Error in PL/SQL report-4.0

    Hi,
    I am using Apex 4.0 and i have a Classic report(function returning query) which selects a date column.
    The query runs at the backend and gives the output.
    But when i run the report on the page, i get the error
    report error:
    ORA-20001: Error fetching column value: ORA-01821: date format not recognizedThe values for the date column are like this 14-MAR-13,01-FEB-13 etc... Everything seems to be right.
    But I have no idea why this error occurs.
    Thanks
    Divya

    Aren't these errors annoying! But there's a data / format mismatch for sure. What I need to see -- and what will tell you what is wrong -- is
    1) exactly what the data is and
    2) exactly what the format string is that is being used to convert it.
    The values for the date column are like this 14-MAR-13,01-FEB-13 etc... Question: Is this the source data or the target data ( what it's supposed to look like after being converted)?
    Let's start there:
    What is the source? Is it a DB column? Is it type date or VARCHAR2 or what?
    If VARCHAR2, then give us an example of the data that is failing.
    What is the format -- I assume there is one -- being used to convert the data?
    Are you doing a TO_CHAR or a TO_DATE?
    Give us lots of detail, please. Then it should be easy to solve.
    Regards,
    Howard

  • 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.

  • How Do i create a list that will show in a dropdown box with the list being pulled from another tab and not the cell data format junk?

    How Do i create a list that will show in a dropdown box with the list being pulled from another tab and not the cell data format junk?
    I currently run OS X 10.10.1
    Now i have been trying to work on this for a while now and what i want to do should be simple but its apparently not.
    Here is an example of what i want to happen.
    I will have 2 tabs: Contact | Sales
    Now Contacts will have the list of names and various information about a customer, While Sales will have one drop-down box for each Cell Row that will show the names of the person in tab contacts
    for what i am wanting to do i cant use the data format pop-up menu because the list is edited everyday several times a day.
    Now how do i do this, Excel can do this so how can numbers do it?

    Hi Shegra,
    Paste this into a applescript editor window and run it from there. In the script you may need to adjust the four properties to agree with your spreadsheet. Let me know if you have any questions.
    quinn
    Script starts:
    -- This script converts column A in one table into an alphabetized list of popups. It copies the last cell in that column. Then reverts the column to text. It then refreshes popups in column A of a data table starting with a user defined row.
    property DataEntrySheet : "Sheet 1" --name of sheet with popups to be refreshed
    property DataEntryTable : "Sales" --name of table with popups to be refreshed
    set copyRange to {}
    property PopValueSheet : "Sheet 1" --name of sheet with popup values table
    property PopValueTable : "Contacts" --name of table with popup values
    set PopStartRow to {}
    tell application "Numbers"
      set d to front document
      set ps to d's sheet PopValueSheet
      set pt to ps's table PopValueTable
      set s to d's sheet DataEntrySheet
      set t to s's table DataEntryTable
      set tf to t's filtered --this records filter setting on data Entry Table
      display dialog "Start from row #..." default answer "" with icon 1 -- with icon file "Path:to:my.icon.icns" --a Week # row
      set PopStartRow to {text returned of result}
      tell pt --convert list to alphabetized popups
      set ptRows to count rows
      set copyRange to ("A2:" & name of cell ptRows of column "A")
      set selection range to range copyRange
      set selection range's format to text
      sort by column 1 direction ascending
      set selection range's format to pop up menu
      -- popupsmade
      set selection range to cell ptRows of column 1 of pt
      set v to value of cell ptRows of pt
      end tell
      activate application "Numbers"
      tell application "System Events" to keystroke "c" using command down
      tell pt
      set selection range to range copyRange
      set selection range's format to text
      end tell
      tell t
      set filtered to false
      set tRows to count rows
      set pasteRange to ((name of cell PopStartRow of column "A") & ":" & (name of cell tRows of column "A"))
      set selection range to range pasteRange
      tell application "System Events" to keystroke "v" using command down
      set filtered to tf
      end tell
    end tell

Maybe you are looking for

  • Printing Checks from Oracle r12

    I'm not too sure on where I should have put this post because I really don't know anything about Oracle. In my company I handle Server and PC maintenance mainly. The only thing I do with Oracle is I have to run a report every morning. The people in t

  • IMAP Read status - 1.3.5

    On 1.3.1 and prior versions of the webOS I was used to the READ status of the IMAP messages coming into the pre almost immediately. Now it seems they stay up until another message comes in.  Let me give you an example: You have your pre on the Touchs

  • Brand new MBP with display problems.Ghosting & Red Pixels

    Bought a MacbookPro at the apple store in Santa Monica,CA as a gift for sister in law who lives inNepal. When we got to Nepal and she started the computer for the 1st time, the display was ghosting, everything that was gray or blue was red tint, & ev

  • RV016 DNS on PPPoE connection

    Hi all, I am trying to install a RV016 behind a layer 2 managed switch provided by ISP.  The ISP is using PPPoE to allow access.  I am able to see that I am connected to ISP's device and I receive a real world IP address on WAN1 of RV016.  I am not a

  • TV guide freezing after upgrade

    Hi The upgrade has been fine for an hour or 2 but now I can't scroll through my TV guide! It's frozen have put my box on standby twice no success will I need to reboot it?