How to validate a date in date picker

Dear All,
ADF BC and ADF faces page, in the page there is a date picker field where i need to apply validation(i.e. select date is greater than the sysdate), i added a validation in the entity object on the corresponding field, using a compare validator, operator: Less Than, compare with: Query Result, sql statement: select sysdate from dual
when the page is commited, i got the following errors, anybody any idea? thank you!
07/09/03 18:18:32 [584] oracle.jbo.common.JboAssert: (Assertion Failed)
     at oracle.jbo.common.Diagnostic.ASSERT(Diagnostic.java:303)
     at oracle.jbo.common.Diagnostic.ASSERT(Diagnostic.java:338)
     at oracle.jbo.server.util.Variant.compareTo(Variant.java:1225)
     at oracle.jbo.server.rules.JboCompareValidator.validateValue(JboCompareValidator.java:171)
07/09/03 18:18:32 [585] *** Using bean introspection to lookup value :currentRowIndexInRange
03-sep 18:18:32 DEBUG (JhsPageLifecycle) -executing processModelUpdaters
03-sep 18:18:32 DEBUG (JhsCollectionModel) -DocumentsCollectionModel: Executing processNewRows
03-sep 18:18:32 DEBUG (JhsCollectionModel) -DocumentsCollectionModel: DocumentsTable new row 0 ignored, no attributes updated.
03-sep 18:18:32 DEBUG (JhsPageLifecycle) -executing validateModelUpdates
03-sep 18:18:32 DEBUG (JhsPageLifecycle) -executing onCommit
07/09/03 18:18:32 [586] DCBindingContainer.reportException :oracle.jbo.TxnValException
07/09/03 18:18:32 [587] oracle.jbo.TxnValException: JBO-27023: Valideren van alle rijen in een transactie is mislukt.
     at oracle.jbo.server.DBTransactionImpl.validate(DBTransactionImpl.java:4051)
     at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:1921)
## Detail 0 ##
oracle.jbo.RowValException: JBO-27024: Valideren van rij met sleutel oracle.jbo.Key[382 ] van type Benchmarks is mislukt.
     at oracle.jbo.server.EntityImpl.validate(EntityImpl.java:1597)
     at oracle.jbo.server.DBTransactionImpl.validate(DBTransactionImpl.java:4031)
## Detail 0 ##
oracle.jbo.AttrValException: JBO-27025: Valideren van attribuut EstimatedComplDate met waarde 2007-08-11 is mislukt.
     at oracle.jbo.server.AttributeDefImpl.validate(AttributeDefImpl.java:1954)
     at oracle.jbo.server.AttributeDefImpl.set(AttributeDefImpl.java:1866)
P.S. some of the message are displayed in Dutch
Message was edited by:
Jerry Yang

But first setLenient(false), because to my mind
DateFormat it apt to be far too lenient
tending to accept things like 30 Feb.A web banking application had setLenient(false). Customers would call support because they got an error message when they tried to get transaction statements for the whole month by entering April 1 - April 31.
We changed to setLenient(true). Consider which leniency mode is right for you. And write better error messages than what we had...
Maybe: if non-lenient fails, parse with lenient; if that succeeds, give a specific error message explaining the situation (or execute with the lenient date, and present results with a warning message "we made a guess at what you meant, check results").

Similar Messages

  • How to validate the dates in the table control ?

    How to validate the dates in the table control ?
    Can I write like this ?
    LOOP AT it_tab .
    CHAIN.
    FIELD : it_tab-strtdat,it_tab-enddat.
    module date_validation.
    ENDCHAIN.
    ENDLOOP.
    Module Date_validation.
    ranges : vdat type sy-datum.
    vdat-sign = 'I'.
    VDAT-LOW = it_tab-STRTDAT.
    VDAT-HIGH = it_tab-ENDDAT.
    VDAT-OPTION = 'BT'.
    APPEND VDAT.
    WHAT CODE I have to write here to validate ?
    and If I write like this How can we know which is the current row being add ?
    It loops total internal table ..?
    Bye,
    Muttu.

    Hi,
    I think there is no need to put chain endchain.
    To do validation you have to write module in PAI which does required validations.
    Thanks
    DARSHAN PATEL

  • How to validate a date in message mapping

    Hi experts,
                    how to validate a date in message mapping. For ex:  if date comes as 2008/02/31, then file it shold not get processed.how to achieve this in message mapping. Please help .
    Thanks&Regards,
    Reyaz Hussain

    Hi,
    There are few simple ways for date validation as follow,
    1.If you would like to handle it in XI only, then in message mapping you could verify about it with the help of generating smart exception.
    For e.g in mapping there is one Date conversion API i.e. somthing DateTransformation It converts the incoming date format to required format. Here give the date format i.e expected from Sender File.
    If in case the format miss-matched then it will create the exception.
    You could handle this exception with the use of [Alert notification|http://help.sap.com/saphelp_nw04/helpdata/en/2c/abb2e7ff6311d194c000a0c93033f7/frameset.htm] and could be even able to notify to sender system about it.
    2. The another solution is easy for SAP synchornous communication --If you are passing the file data to SAP, then you could use below function modules to verify date format in receiver RFC/BAPI or inbound IDOC program. If the sy-subrc is not 0 then don't process further.
    CONVERT_DATE_FORMAT
    ISU_DATE_FORMAT_CHECK
    Thanks
    Swarup

  • How to implement a Date Picker (Calendar) as a LOV in Portal Form?

    I have a form, which will input date from user, and I also have javascript calender.
    How to implement a Date Picker (Calendar) as a LOV in Portal Form? Do I need to choose POPUP and LOV for Date?
    Instead of typing the Date within a Portal form, a popup Calender that will allow user to Pick a date.
    Please help anyone!!

    Once you have the JavaScript and have added it to your form, you need to the the following. First off, you need to be able to customize the HTML code for the form (i.e. choose custom for form type when creating the form). Once you do that go into the custom layout to customize your HTML code. Find the field you want to add the date picker to. It will be <#your_field_name.ITEM#>
    Paste this code after it:
    <a href="javascript:show_calendar('forms[0.elements[16');" onmouseover="window.status='Date Picker';return true;" onmouseout="window.status='';return true;"><img src="the source of your image file" width=34 height=21 border=0></a></TD>
    You will have to play around with the forms[0].elements[16]. 16 is what date field is set to. However your will differ, so just play with it.
    Hope this helps.
    Martin

  • How to use the date picker in Web dynpro java

    Hi,
    I want to add date picker to enter a date while developing webdynpro application.
    How can i do that.
    Regards,
    H.V.Swathi

    Hi,
    its very simple...
    take a input field and map it to the attribute which data type is of "date". thats it at runtime you will see a input filed with date picker.
    i.e. Add an inputField and bind the context attribute of Type Date to it
    this will show the date picker on screen.
    PradeeP

  • How to validate when date format is diff Internally and externally

    Hello,
    How can I validate the Date format if Internal format and external format is different.
    Ex :
    *  SELECT SINGLE CRTSP
    **                FROM /SAPSLL/PR
    **                INTO L_CRTSP
    **                WHERE CRTSP IN S_CRTSP .
    CRTSP (YYYY/DD/MM HHMMSEC) Internal Format
    S_CRTSP (YYYY/DD/MM) External format - selection option
    I had done following to convert the internal format to external format.
    DATA : LV_DT TYPE STRING.
    DATA :  L_CRTSP TYPE /SAPSLL/CRTSP.
    SELECT SINGLE CRTSP
                    FROM /SAPSLL/PR
                    INTO L_CRTSP.
    MOVE : L_CRTSP TO LV_DT. "(YYYY/DD/MM HHMMSEC)
    L_LEN = STRLEN( LV_DT ).
    L_DATE = LV_DT+0(8).
    I have the date format that i need in L_DATE."  (YYYY/DD/MM)
    Now how should I validate?
    *  SELECT SINGLE CRTSP
    **                FROM /SAPSLL/PR
    **                INTO L_CRTSP
    **                WHERE CRTSP IN S_CRTSP .
    Please let me know how can I validate or how can I write the select query to validate this field.
    There should be some way using Wildcard or some function module...which I am not sure...
    Any suggestions will be appreciated!
    Regards,
    Kittu
    Edited by: Kittu on Jan 6, 2009 12:58 PM

    Hello,
    Thank you for youe response and I apprecaite the help so far.
    This logic work if it is Parameter...When I have select option it is not working as it is not taking the range values...
    SELECT GUID_PR "Primary Key as GUID in "RAW" Format
    CRTSP "PRODUCT CREATED ON
    CHTSP "PRODUCT CHANGED ON
    FROM /SAPSLL/PR
    INTO TABLE T_PR.
    DATA : T_PR1 TYPE TY_PR OCCURS 0 WITH HEADER LINE.
    DATA:  W_TEST    TYPE STRING,
           W_LV_LEN  TYPE I,
           W_LV_LEN1 TYPE I,
           W_LV_DATE(20)  TYPE C,
           W_LV_DATE1(20) TYPE C.
    DATA : W_V(8) TYPE C,
           S_CT(11) TYPE C.
    SORT T_PR BY CRTSP CHTSP.
    LOOP AT T_PR INTO WA_PR.
      W_TEST = WA_PR-CRTSP.
      W_LV_LEN = STRLEN( W_TEST ).
      W_LV_DATE = W_TEST+0(8).
    ** IF WE SELECT ONLY ONE DATE IN SELECT OPTION
    s_crtsp VALUE IS - IEQ20040101..bY REMOVING FIRST THRID DIGITS
    WE ARE GETTING THE S_CRTSP VALUE IS 20040101 AND THIS LOGIC IS WORKING FINE..
       MOVE S_CRTSP TO S_CT.
      W_LV_LEN1 = STRLEN( S_CT ).
      W_LV_DATE1 = S_CT+3(8).
    *  IF W_LV_DATE NE S_CRTSP
    IF W_LV_DATE NE W_LV_DATE1.
      W_FLG = 'X'.
        DELETE T_PR INDEX SY-TABIX.
      ENDIF.
      CLEAR W_FLG.
    ENDLOOP.
    Can we do anything for this...
    ANy suggestions would be apprecaited!
    Regards,
    Kittu

  • How can use a date picker to fill in dates in Numbers

    I would like to know how can I have cells in date format which I would be able to fill with a date picker fro a calendar?

    There is no date picker gui item in Numbers.  Every idea I thought of in my head took longer then typing.  If you describe your specific problem a little more people may be able to provide some other solutions

  • How to validate LOV data

    Hi,
    how to validate lov feild data ??
    Requirement is my page have 2 lov feilds, It is a dependent lov.
    The feilds will not allow the invalid data in lov feilds when i click on 'save' button. Then i need to display a message "select valid values in lov feilds".
    Can anyone help me on this req....
    Thanks
    Edited by: 926074 on Apr 12, 2012 1:23 PM

    Hi niranj,
    I am using submit button.
    All the properties what u r said exactly same. But it is not working
    PG.xml code
    <?xml version="1.0" encoding="UTF-8" ?>
    - <!-- dbdrv: exec java oracle/jrad/tools/xml/importer XMLImporter.class java &phase=dat+24 checkfile:~PROD:~PATH:~FILE &fullpath:~PROD:~PATH:~FILE -username &un_apps -password &pw_apps -dbconnection &jdbc_db_addr -userId "1" -rootPackage /oracle/apps/~PROD -rootdir &fullpath:~PROD:mds:directory
    -->
    - <page xmlns:jrad="http://xmlns.oracle.com/jrad" xmlns:oa="http://xmlns.oracle.com/oa" xmlns:ui="http://xmlns.oracle.com/uix/ui" version="9.0.3.8.12_1330" xml:lang="en-US" xmlns:user="http://xmlns.oracle.com/jrad/user" xmlns="http://xmlns.oracle.com/jrad" file-version="$Header$">
    - <content>
    - <oa:pageLayout id="MainRN" amDefName="wnsgs.oracle.apps.sysadmin.requestforaccess.server.RequestforAccessAM" windowTitle="Create New Responsibility" title="Create New Responsibility" controllerClass="wnsgs.oracle.apps.sysadmin.requestforaccess.webui.RequestAccessDetailsCO">
    - <ui:corporateBranding>
    <oa:image id="corporateBrandingImage" source="/OA_MEDIA/FNDSSCORP.gif" />
    </ui:corporateBranding>
    - <ui:contents>
    - <oa:advancedTable id="ResultsAdvTable" viewName="RequestAccessDetailsVO1">
    - <ui:contents>
    - <oa:column id="column4">
    - <ui:columnHeader>
    <oa:sortableHeader id="sortableHeader4" prompt="Request ID" />
    </ui:columnHeader>
    - <ui:contents>
    <oa:messageTextInput id="RequestId" viewAttr="RequestId" readOnly="true" dataType="NUMBER" />
    </ui:contents>
    </oa:column>
    - <oa:column id="column1" width="75%">
    - <ui:columnHeader>
    <oa:sortableHeader id="sortableHeader1" prompt="Application Name" cellNoWrapFormat="true" abbreviation="" />
    </ui:columnHeader>
    - <ui:contents>
    - <oa:messageLovInput id="ApplicationName" viewAttr="ApplicationName" readOnly="false" maximumLength="100" columns="60" unvalidated="false" required="no" queryable="true">
    - <lovContents>
    - <oa:listOfValues id="region5" amDefName="wnsgs.oracle.apps.sysadmin.requestforaccess.server.RequestforAccessAM">
    - <ui:contents>
    - <oa:table name="region5" id="ApplicationNamepoplistVO1">
    - <ui:contents>
    <oa:messageStyledText id="ApplicationName1" dataType="VARCHAR2" prompt="ApplicationName" viewName="ApplicationNamepoplistVO1" viewAttr="ApplicationName" maximumLength="240" queryable="true" selectiveSearchCriteria="false" required="no" />
    </ui:contents>
    </oa:table>
    </ui:contents>
    </oa:listOfValues>
    </lovContents>
    - <lovMappings>
    <lovMap id="lovMap1" resultTo="ApplicationName" lovItem="ApplicationName1" criteriaFrom="ApplicationName" useForValidation="default" requiredForLOV="false" />
    <lovMap id="lovMap3" lovItem="ApplicationName1" resultTo="link" useForValidation="default" requiredForLOV="false" />
    </lovMappings>
    </oa:messageLovInput>
    </ui:contents>
    </oa:column>
    - <oa:column id="column2">
    - <ui:columnHeader>
    <oa:sortableHeader id="sortableHeader2" prompt="Responsibility Name" cellNoWrapFormat="true" />
    </ui:columnHeader>
    - <ui:contents>
    - <oa:messageLovInput id="ResposibilityName" viewAttr="ResponsibilityName" columns="60" unvalidated="false" required="no" disabled="false" tipType="none" readOnly="${oa.DisableFeildPVO1.xxdisable}" rendered="true">
    - <lovContents>
    - <oa:listOfValues id="region6">
    - <ui:contents>
    - <oa:table name="region6" id="ResponsibilitypoplistVO1">
    - <ui:contents>
    <oa:messageStyledText id="ResponsibilityName" dataType="VARCHAR2" prompt="ResponsibilityName" viewName="ResponsibilitypoplistVO1" viewAttr="ResponsibilityName" maximumLength="100" queryable="true" required="no" />
    <oa:messageStyledText id="ApplicationName2" dataType="VARCHAR2" prompt="ApplicationName" viewName="ResponsibilitypoplistVO1" viewAttr="ApplicationName" maximumLength="240" />
    </ui:contents>
    </oa:table>
    </ui:contents>
    </oa:listOfValues>
    </lovContents>
    - <lovMappings>
    <lovMap id="lovMap2" lovItem="ResponsibilityName" resultTo="ResposibilityName" criteriaFrom="ResposibilityName" useForValidation="default" requiredForLOV="false" />
    <lovMap id="lovMap4" lovItem="ApplicationName2" criteriaFrom="link" useForValidation="default" requiredForLOV="false" />
    </lovMappings>
    </oa:messageLovInput>
    </ui:contents>
    </oa:column>
    - <oa:column id="column3">
    - <ui:columnHeader>
    <oa:sortableHeader id="sortableHeader3" prompt="Delete" />
    </ui:columnHeader>
    - <ui:contents>
    - <oa:image id="Delete" source="deleteicon_enabled.gif" prompt="delete" imageHeight="24" imageWidth="24">
    - <ui:primaryClientAction>
    - <ui:fireAction event="delete">
    - <ui:parameters>
    <ui:parameter key="Requestid" value="${oa.RequestAccessDetailsVO1.RequestId}" />
    </ui:parameters>
    </ui:fireAction>
    </ui:primaryClientAction>
    </oa:image>
    </ui:contents>
    </oa:column>
    <oa:formValue id="link" viewAttr="ApplicationName" />
    </ui:contents>
    - <ui:tableActions>
    - <oa:flowLayout id="region4">
    - <ui:contents>
    <oa:submitButton id="AddRow" text="Add Another Row" prompt="Add Another Row" />
    </ui:contents>
    </oa:flowLayout>
    </ui:tableActions>
    </oa:advancedTable>
    - <oa:rowLayout id="region3">
    - <ui:contents>
    <oa:submitButton id="Save" text="Save" prompt="Save" disabled="false" />
    <oa:spacer id="item1" width="5" />
    <oa:submitButton id="Submit" text="Submit" prompt="Submit" />
    <oa:spacer id="item2" width="5" />
    <oa:submitButton id="Home" text="Go to Home" prompt="Go to Home" />
    </ui:contents>
    </oa:rowLayout>
    <oa:formValue id="requestid" viewName="RequestforAccessHeadersVO1" viewAttr="RequestId" />
    <oa:formValue id="UserID" viewName="RequestforaccessVO1" viewAttr="EmployeeNumber" />
    </ui:contents>
    </oa:pageLayout>
    </content>
    </page>
    Thanks
    Edited by: 926074 on Apr 16, 2012 6:21 PM

  • How to adjust the Date picker size

    how to change the size of the Date Picker.
    I am using time inside the data picker and window is too small.
    I cannot see the OK and Cancel buttons.
    Let me know
    thanks

    It is an known APEX 3.1 issue metioned in the "Oracle Application Express 3.1 Known Issues & Limitations" Page([http://www.oracle.com/technology/products/database/application_express/html/3.1_known_issues.html]).
    There is a workaround posted in forum, see Re: Date popup problem in APEX 3.1 and this post was also mentioned in the "Oracle Application Express 3.1 Known Issues & Limitations" Page.
    JT

  • How to insert a date picker input text field in a JSF Jsp page

    Hi,
    I have to develop an application using generic facets, unfortunately I am not supposed to use ADF Faces components given by Oracle.
    Now my requirement is, on JSP page an input text field which holds a DATE value is required, it should also have a Date Picker Calendar adjacent to it.
    Could you pls shed some light on this issue and help me out.
    Thanks
    ~Siva(ji)

    <HTML>
    <script language="JavaScript" type="text/javascript">
    <!--
    var pUpWidthc = 300; //Change the pUpWidthc to your requirements.
    var scrAvailc = 400;     //Change to your available screen width. You see in
    //this eBooks' middle frame, the frame width is
                                                                //equal to 410 . So whether your using frames or
                                                                //or a full 800 pixel screen, you must calculate
                                                                //your available screen width.
    var PopUpC = document.getElementById("pUpc");
    document.write('<div id="pUpc" style="visibility:hidden;z-index:4;width:'+pUpWidthc+';position:absolute;"></div>');
    function cstmPup(objC,c){
    popUpC = document.getElementById("pUpc");
    popUpC.innerHTML = c.innerHTML
    popUpC.style.left = getPos(objC,"Left");
    var scrNeedc = getPos(objC,"Left") + pUpWidthc;
    if (scrNeedc > scrAvailc){
    //The number 10 below is an extra offset x value applied when the
    //definitional popup box positions beyond your screen width. You
    //can change this number to fine tune your "beyond screenwidth" positioning.
    var scrOffsetC = getPos(objC,"Left") + pUpWidthc - (scrAvailc);
    popUpC.style.left = getPos(objC,"Left") - (scrOffsetC - 0);
    popUpC.style.top = getPos(objC,"Top") + objC.offsetHeight;
    popUpC.style.visibility = 'visible';
    fill();
    function fill()
         var noOfRows=7,noOfCols=7,i=0,j=0,day=1,x;
    var d1=FirstDayOfWeek(7,2008);
    //40     
         for(i=1;i<noOfRows;i++)
              x=document.getElementById('myTable').insertRow(i);
              for(j=0;j<noOfCols;j++)
                   var y=x.insertCell(j);
                   if( ( i==1 && j<d1))
                   y.innerHTML="";
                   else if(day<=DaysInMonth(7,2008)){
                   y.innerHTML=day;
                   day++;
    //document.write(FirstDayOfWeek(7,2008));
    function FirstDayOfWeek(m,y)
    var i;
    var dow = 6;
    //document.write("Hello");
    for (i=1583; i<y; i++)
    dow += (LeapYear(i)) ? 2 : 1;
    for (i=1; i<m; i++)
    dow += DaysInMonth(i,y);
    return dow % 7;
    function DaysInMonth(m,y)
    // m is the month number (1,2,3,...12), y is the year number (four digits)
    switch (m)
    case 1:
    case 3:
    case 5:
    case 7:
    case 8:
    case 10:
    case 12: return 31;
    case 2: if (LeapYear(y))
    return 29;
    else
    return 28;
    default: return 30;
    function LeapYear(y)
    return (y % 4==0) && ((y % 100!=0) || (y % 400==0));
    function getPos(objC,sPos){
    var iPos = 0;
    while (objC != null) {
    iPos += objC["offset" + sPos];
    objC = objC.offsetParent;}
    return iPos;
    function hPopUpc(){
    popUpC = document.getElementById("pUpc");
    popUpC.style.visibility = 'hidden';
    //-->
    </script>
    <BODY
    <button id="c1" onclick="cstmPup(c1,pUpCstm)">Custom PopUp</button>
    <'div' id="pUpCstm" style="display:none;">
    <'div' id="myid" align="left" style=" width:100%; height:100%; background:#cccccb; border:1px solid black; border-top:1px solid white; border-left:1px solid white; padding:10px; font:normal 10pt tahoma; padding-left:18px "> <b>Rich Message Boxes</b>
    <hr size="1" style="border:1px solid black;">
         <div style="width:220px; font-family:tahoma; font-size:80%; line-height:1.5em"><br>
              <table border ="1" id="myTable">
                   <TR>
                        <TD> SUN </TD>
                        <TD> MON </TD>
                        <TD> TUE </TD>
                        <TD> WED </TD>
                        <TD> THU </TD>
                        <TD> FRI </TD>
                        <TD> SAT </TD>
                   </TR>
              </table>
         <br><br>
         </div>
         <br>
         <div>
    <button tabindex="-1" onclick="hPopUpc()" style="border:1px solid black; border-left:1px solid white; border-top:1px solid white; background:#cccccc ">Close Message</button>
    </div>
    <?BODY
    </HTML>
    Message was edited by:
    mchepuri
    Message was edited by:
    mchepuri
    Message was edited by:
    mchepuri

  • How to validate the date in my class

    Hi
    In my project with jsp and struts I need to validate the date field.
    So in the action class I want to validate the date that is the date is in dd/mm/year format?
    can anybody please give some idea to do this?
    Thank you so much.

    Here is a method that validates day/month/year using the Calendar class.
         public boolean validateDate(int day, int month, int year) {
              try {
                   Calendar cal = Calendar.getInstance();
                   cal.clear();
                   cal.setLenient(false);
                   cal.set(year, month-1, day);
                   // need to call getTime() to make the calendar compute/validate the date
                   cal.getTime();
                   return true;
              catch (IllegalArgumentException e) {               
                   return false;
         }

  • How to disable the date picker in manualy Tabular form?

    I develope an application with apex 3.2 , I builded a tabular form manualy with APEX API and I have an item 'date picker' , I want that once user want insert the date , he can do it only by clicking on the date picker and not into the item
    I try to use the code that was provided by 'Desnes Kubicek' on his blog , but it does not works
    Any help!!!!!
    I used this code , but that is for an one item form
    <script type="text/javascript">
    function disFormItems(item1){
    disItem = document.getElementById(item1);
    disItem.style.background = '#eeeeee';
    disItem.disabled = true;
    </script>
    2. Region Footer javascript:
    <script type="text/javascript">
    disFormItems('P18_DATE_PICKER');
    </script>

    Hi,
    Try something like this
    SELECT
    APEX_ITEM.DATE_POPUP(4,rownum,hiredate,'dd-mon-yyyy',12,15,'readonly="readonly"','f04_' || ROWNUM) hd
    FROM EMP;Thanks,
    Manish

  • How to set the date picker to display only months?

    I am trying to set the date picker in SSRS 2012 to allow the user just to select the months:  and when I run my store procedure I get a can't convert data type from nvarchar to datetime.  If I don't comment out of the Where Clause, nothing
    is returned if I leave the Where Clause in.
    Alter
    PROCEDURE RollingReportList
    AS
    BEGIN
    SET NOCOUNT
    ON;
    SELECT
    distinct
       [ItemDescription]
    ,[QuantityOrdered]
      ,QuanitityCost
    = [QuantityOrdered]
    * [Price]
    ,Convert(datetime,(CONVERT(CHAR(4),PE.[LastUpdated],107) 
    + '-'
    + (right(CONVERT(CHAR(4),PE.[LastUpdated],112),2)))) 
    as CurrentMonth 
    ,Convert(datetime,(CONVERT(CHAR(3),Datename(MONTH,DATEADD(MONTH,1,PE.LastUpdated)),107) 
    + '-'
    + (right(CONVERT(CHAR(4),PE.[LastUpdated],112),2))))
    as NextMonth
      ,Name
    FROM
    [HQStore].[dbo].[PurchaseOrderEntry]
    as PE
    inner join
    [HQStore].[dbo].[PurchaseOrder]
    as PO
    on  PE.[PurchaseOrderID]
    = PO.[ID]
    inner join
    [HQStore].[dbo].[Store]
    as ST
    on PE.[storeid]=ST.ID
    Where 
    (@Start
    = '01/01/2009'
    and  @Last
    =  '12/31/2010')
    End
    Go
     Exec
    RollingReportList
    Any Help?

    Try the below....
    Where  (@Start = '20090101' and  @Last =  '20101231')
    SELECT FORMAT(getdate(), 'MM')
    02
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How to validate the data in the table

    Hi Experts,
    My question is
    I am having a table control on my view. I need to validate the data entered by the user on the table
    and after validation i need to save the data into database table.
    Now my question is only related to Data Validation on table UI element.
    If the user enters 3 rows and if the 2nd and 3rd row are already existing,
    It should throw the message Entry already exists and the pointer should
    be at Row number 2 in this case.
    Similarly in the 2nd row i have a date field and if the user enters some character
    then it should throw an error message that Numeric values are only allowed and
    the pointer is placed in the 2nd row Date column so that it allows user to modify
    the wrong entry.
    Please advise.
    Regards,
    Chitrasen

    Hi,
    for validating user input in table , you have to get the entries inserted by user into an internal table using get_static_attribute_table and futher have your check using loop endloop.
    For date field, make the context attribute binded to date column as DATS. This would make sure the user inputs a valid date without your custom code.

  • How to validate a date with time

    Hi All,
    How can I validate date with time?
    Here is my code:
    var tempDate:Date = new Date();
    if (tempDate < '09/18/2012 7:30:00 AM'){
         doSomething
    Thanks in advanced

    I think i got it to work.
    var tempDate:Date = new Date();
    var oldDate:Date = new Date('09/18/2012 7:30:00 AM');
    if ( Number(tempDate) < Number(oldDate) ){
         doSomething
    Best,

Maybe you are looking for

  • Change default wireless dhcp

    I want to deploy an Airport in an existing network address space of 10.90.8.0. The default wireless dhcp address space is 10.0.1..0. Can I change that default or must I reassign all ip address to conform with the Airport default?

  • Class projest

    I am in a Java class and am trying to get my first program to work. I was given the code, but are unabel to compile it. The instructor has been very little help in teaching me what I am suppose to learn. I have tried to complie the code but keep gett

  • Appraisal template becaome hazzy when scroll.?

    After upgrade from ECC 5 To ECC 6, Our Appraisal template become hazzy in portal view when scroll is used.... We are using Standard BSP application HAP_DOCUMENT. Please Suggest.

  • Which server do I install Crystal Reports Server On?

    I'm new to crystal reports server and preparing to install 2008.  I've been through the Crystal Reports Server 2008 Quick  Installation Guide for Window and it does not refer to which server it should be installed on.  I'm currently running a SQL ser

  • Interruption while updating from 12.1.1 to 12.1.3

    Dear Legends, As i am doing an upgrade of 12.1.3 from 12.1.1, first patch 9239089 has been applied successfully but while compiling the APPS schema it shows an error kernel : journal commit I/O error I kindly request you to help me on this by providi