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

Similar Messages

  • How to set the data fields column wide at sqlplus

    Dear Sir/Madam
    I would like to know how to set the data fields column wide at sqlplus
    Thanks
    Francis

    see
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch6.htm#sthref1131
    and the FORMAT clause of the COLUMN command in
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12013.htm#BACHCABF

  • How to set the Data Synchronisation mode for ADF BC component?

    Hi All,
    How to set the Data Synchronisation mode for ADF BC component
    Thanks
    Raghavendra

    Can you clarify what you mean by the data synchronization mode?
    If you mean the Sync Mode, then in 10.1.3 you set this property by:
    1. Selecting your DataBindings.cpx file
    2. Expanding the "Data Control Usages" section in the structure window
    3. Selecting the ADFBC-based data control
    4. Setting the "syncMode" property in the property inspector.

  • How to set the number of records displayed at run time

    Is it possible to set the number of records displayed block property at run time? The built-in 'GET_BLOCK_PROPERTY' can retrieve the number of RECORDS_DISPLAYED. But I can't find SET_BLOCK_PROPERTY to set this property. Is there anyway I can set this property programmatically? Thanks for any suggestions!

    Bookmark Go to End
    goal: How to vary the number of records displayed in a block
    programmatically
    fact: Oracle Forms Developer
    fix:
    Block property 'Number of Records Displayed' can not be changed during runtime
    using SET_BLOCK_PROPERTY. However, it is still possible programmatically change
    the visual appearance of the form so that it creates effect of changing this
    property. To achieve such an effect follow these steps:
    1. in Forms Builder, in the multirecord block define the new set of items.
    The simplest way is to copy/paste the original item and rename created item.
    2. set properties of these new items so that they are the same as the properties
    of the original items. If these new items were copied from original items
    then properties are already the same. Modify following properties
    'Database item' on new items to value 'No'
    'Synchronize with item' to the value of the original item
    'Number of Items Displayed' to desired value.
    'Visible' to 'No'
    In other words, these new items are mirrors of original items.
    3. code event, which is meant to trigger the change in block appearance.
    This code should use SET_ITEM_PROPERTY built-in to set properties
    like 'VISIBLE', 'ENABLED', 'NAVIGABLE', 'UPDATE_ALLOWED' and others
    to desired value for items which are about to be displayed, then
    move cursor to one of these just displayed items with GO_ITEM built-in
    and then hide the previously displayed items.
    Example:
    Assume that the block is built on SCOTT.DEPT schema. Following will
    change the set of displayed items
    set_item_property('dept.mdeptno',visible,property_true);
    set_item_property('dept.mdname',visible,property_true);
    set_item_property('dept.mloc',visible,property_true);
    set_item_property('dept.mdeptno',enabled,property_true);
    set_item_property('dept.mdname',enabled,property_true);
    set_item_property('dept.mloc',enabled,property_true);
    set_item_property('dept.mdeptno',update_allowed,property_true);
    set_item_property('dept.mdname',update_allowed,property_true);
    set_item_property('dept.mloc',update_allowed,property_true);
    set_item_property('dept.mdeptno',navigable,property_true);
    set_item_property('dept.mdname',navigable,property_true);
    set_item_property('dept.mloc',navigable,property_true);
    go_item('dept.mdeptno');
    set_item_property('dept.deptno',visible,property_false);
    set_item_property('dept.dname',visible,property_false);
    set_item_property('dept.loc',visible,property_false);
    Regards,
    Monica

  • 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 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 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 data packet in order??

    we have 20 datapackets that is in sequence order how to set in order wise ?
    Example:- this is the scenario Data packets is in this order 20,1,10,5,9,13,4,8,13,2,15,19,14Like this
    I have to set in order wise how to doit??????

    HI
    I think you sjust should use a process chain.
    Call transaction RSPC and build it within the order needed.
    regards
    Tom

  • How to set the Date and Currency Formats Based on Country

    Hi Friends,
    I am designing the one Global Form it will use for all countries.
    in that Form i want to print the date and currnecy Formats based on country.
    Like
    For US i want print the date and Currency Like This.
    Date -  MM/DD/YYYY
    Curremcy - XX,XXX,XX.XX
    For DE i want print the date and Currency Like This.
    Date -  DD.MM.YYYY
    Curremcy - XX.XXX.XX,XX
    Please suggest how i can control these things through Java Script or Formcalc....

    Hi Nitin,
    thanks For ur reply,
    i tried with this solution,
    But it is displaying the default Format like bellow formats.
    For short - mm/dd/yy
    For Medium - mmm dd , yyyy
    For Long     - thursday ,mmm dd , yyyy
    it was prinitng in above mentioned format,
    but here i want to print my own format for USA like MM/DD/YYYY.

  • How to set the date date type to work

    This may be a silly question, but I can't seem to get the Date data type to work for a date account member. When I go into the Planning app and choose an account that I want to set as a date entry account, the web form doesn't seem to show that the date setting works for the account. I even set my account type to be Saved Assumption. For example, I expect to see the date formatted to 10/20/2009 when I enter that value in the web form under my account "Hire Date". I also checked the display options under the Planning preferences. So does anyone know if this function even works on 9.3 or 11.1?

    Hi,
    Sounds like you have not set the evaluation order for accounts. Administration > Dimensions > Evaluation Order > select plan type > move accounts to the other window, apply.
    Try the form again.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How to set the data in af:selectOrderShuttle with reorderOnly "true"

    I created codes like below, but after the page is loaded, there is not any data in the list. even I added a String array(employeeMB.columns) with some value in the managed bean, nothing did I get. How can I set the initial data in the list with reorderOnly set to "true"? I am using JDeveloper 11.1.1.2.0. Thanks.
    +<af:selectOrderShuttle value="#{employeeMB.columns}"+
    reorderOnly="true" id="colsMonitor">
    +<af:selectItem label="Empno" value="Empno"/>+
    +<af:selectItem label="Name" value="Ename"/>+
    +<af:selectItem label="Job" value="Job"/>+
    +<af:selectItem label="Department" value="Deptno"/>+
    +<af:selectItem label="Hiredate" value="Hiredate"/>+
    +<af:selectItem label="Salary" value="Sal"/>+
    +<af:selectItem label="Commission" value="Comm"/>+
    +<af:selectItem label="Manager" value="Mgr"/>+
    +</af:selectOrderShuttle>+

    Hi,
    A helpful thread for you:----
    Dynamically Change Data Provider in Anaylsis Grid in Bex Workbook 7.0
    Regards,
    Suman

  • How to retive the data from ALV display when checkbox clicked

    HI.....
    suppose i have a ALV list with 3 fields and checkbox attached with it.Now if i click any of the checkbox i want to retrieve the data from a particular field from one of the 3 fields.How shal i do that....
    Kind Regards.

    hi
    use the  field catalog property wa_fcat-hotspot = 'X' and then
    in in list display
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
          EXPORTING
            i_callback_program       = g_repid
            i_callback_pf_status_set = 'PFTEST'
    i_callback_user_command  = 'USER_COMMAND_ALV
            is_layout                = l_layout
            it_fieldcat              = it_fcat[]
          TABLES
            t_outtab                 = it_outtab[]
          EXCEPTIONS
            program_error            = 1
            OTHERS                   = 2.
        IF sy-subrc <> 0.
    FORM user_command_alv USING r_ucomm     LIKE sy-ucomm
                                rs_selfield TYPE slis_selfield.
      DATA: l_index      LIKE sy-tabix.
      DATA: l_belnr      TYPE rbkp-belnr.
      DATA: l_gjahr      TYPE rbkp-gjahr.
      DATA: l_awkey      TYPE bkpf-awkey.
      DATA: lwa_bkpf TYPE bkpf.
      CLEAR g_flag.
      IF r_ucomm EQ 'CREATESO'.
        REFRESH it_outsel[].
        LOOP AT it_outtab INTO wa_outtab.
          IF wa_outtab-check = 'X'.
    delete and put in new itab.
          ENDIF.
          CLEAR wa_outtab.
        ENDLOOP.
    shiva

  • How to set the number of rows displayed in a classical report at runtime?

    Hi,
    Our customer has several standard client hardware configuration and would like to enable end users to choose their 'display profile' at login time. This 'display profile' would contain predefined values for these hardware configurations and supposed to set various paramters that should define the number of rows displayed in a classical report region.
    I tried to provide parameters on the report region but it refused to accept anything but numerical values. Is it possible to do this?
    Regards, Tamas

    The link is to the closest linkable point in the documentation to the description of the Number of Rows (Item) attribute.
    It sounds like you have been trying to enter&mdash;unsuccessfully&mdash;an item name or substitution string into the Number of Rows attribute. The Number of Rows (Item) attribute is the one that actually allows you to do this. Click on the flashlight icon beside it to get a list of items from the application.

  • How to set the Date in excel through Java?

    now i am using
    cell.setCellValue(date);
    date is in format of "dd/MM/yyyy"
    But when it set on excel , it sets as number.
    I need the date as in same format as what i given.
    Assist me.

    Consult the docs of the API you're using. We can't say much about it because you didn't even mention the API used and it is also not recognizeable as part of any standard Sun Java API's. It might help to consult their own forum/mailinglist -if any- as well.

  • How to set the date and time format from Windows Server 2008 R2

    Hi,
    I want to control my client's date and time format as dd/mm/yyyy format and I need to do it using the windows server 2008 R2. How can I achieve this goal?
    Yoshika04

    Hi,
    In Windows Server 2008 R2, you can use Regional Options Extension in Group Policy Preferences to configure the date and
    time format. For more information, please refer to:
    Regional Options Extension
    http://technet.microsoft.com/en-us/library/cc754496.aspx
    Regards,
    Bruce

Maybe you are looking for

  • How do I report an app that rips off a child?

    The app Happy Theme Park by Infinidy Corp that was for free download on 7/11 that cons kids to purchase coins in order to play without them realizing they are actually spending BIG money such as a truckload of coins for $99.   It appears as if it is

  • How can I forward a request from to another servlet?

    If I would like to forward a request from a servlet to another one, but they are not located in the same machine. Could I use the following code to do it? getServletConfig().getServletContext().getRequestDispatcher("XXXXX").forward(request, response)

  • PSE 5: saving of catalog impossible ?

    I had a bad crash on my PC, but to copy all files including catalog worked fine. After this I just tried to make a backup of my actual catalog of PSE 5. Now it is not possible to change the location of the catalog folder with "saving under...". It is

  • Photo Page picture sizes

    Is there a way to control the sizes of pictures displayed when one clicks on individual thumbnails in photo pages in iWeb. They display at 600 pixel size along the longer side. If one then drags and drops them onto the desktop and subsequently opens

  • Person is already being processed by in while updating an infotype through

    Hi,    I am trying to update custom infotypes through BDC based on status change of employee in infotype 0000 , while the BDC is executing I am getting an error message 'Person is already being processed by - ' What is this error and how to rectify i