Date Range expression

Hello,
I have created two parameters ( named as Date1 and Date2), my main aim is to find out records which are inserted in between, EX: 10/19/2008 and 12/9/2009. what is the expression  and i have write my expression.
Can you please provide suitable solution for my question.
Thank you.
Regards
RP Reddy

I am trying to do the exact same as you listed in SSRS,
WHERE Date between @Date1 and @Date2, but it keeps throwing the error: ORA-01858: non-numeric character found where a numeric was expected. 
Would you know how I should code this differently?
Thank you,
In oracle try like below
trans_date >= to_date(@date1)
and
trans_date <= to_date(@date2)
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Similar Messages

  • Multi Mailbox Search Date Range Results Inaccurate

    Hi All,
    I have an Exchange 2010 server with SP3 /RU3 installed. When I do a multi mailbox search using OWA /ECP and put in a start and end date from the Date Range dropdown box, my search results shows me more than just the intended date range of emails. For
    example; if I request just a particular month and year, my results will show a couple of years worth of emails not just the one month that I requested.
    If I do the same exact search using PowerShell command the results are accurate, they will show only the one month. We could use PowerShell commands but we'd would rather use the OWA /ECP console instead. To me it seems like a bug in the code. Has anyone
    else experience this issue or have a resolution?
    Thanks in advance.
    LJC321

    Possibly, this could be BUG.
    Haven't experience this kind of issue...
    Cheers,
    Gulab Prasad
    Technology Consultant
    My Blog:
    Exchange Ranger
    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

  • Query based on a date range

    I want to query based on a date range. I wrote the following EJB QL:
    "select object(a) from ActionItems as a where a.dueDate
    between ?1 and ?2"
    But when I deployed the application to Oracle's EJB server, I got the following error:
    Auto-deploying biogen.jar (No previous deployment found)... Invalid type for expression (a.dueDate BETWEEN ?1 AND ?2)
    EJB QL statement : 'select object(a) from ActionItems as a where a.dueDate between ?1 and ?2'
    EJB QL method : public abstract java.util.Collection ActionItemsLocalHome.findByDueDateRange(java.sql.Date,java.sql.Date) throws javax.ejb.FinderException
    at com.sun.ejb.ejbql.parser.EjbQLParser.parse EjbQLParser.java:218)
    at com.sun.ejb.ejbql.EjbQLDriver.parse(EjbQLDriver.java:86)
    at com.sun.ejb.sqlgen.SQLGenerator.generateSQLForEjbQLQueries(SQLGenerator.java:704)
    It works fine for a number range, but does not work for a date range.
    Any one has an idea on how to write a correct EJB QL for a query based on date range?
    Thanks.
    Jingzhi

    Re-posted. Please help!

  • Count records for a specific date range

    Hi,
    I am using BI Publisher with Siebel 8.1.1.1. I have a monthly report where I want to count the number of service requests entered per customer per month.
    I am using the following expression that works for one month:
    <?count(ssServiceRequest[ssSeverity[.='1-Critical'] and xdoxslt:date_diff('d',psfn:getCanonicalDate(ssCreated), xdoxslt:current_date($_XDOLOCALE,$_XDOTIMEZONE), $_XDOLOCALE, $_XDOTIMEZONE) <=28])?>
    However, I want to be able to specify a specific date range for my count, i.e ssCreated >= '01/02/2011' and <= '28/02/2011', as opposed to count for the past 28 days. Can you please advise what syntax I can use to specify a date range?
    Any help will be greatly appreciated!
    Claire

    Hello,
    Many many thanks for your reply.
    I'm doing as you suggest and am using the date_diff to the end of the period in question. I've tried the following to get the number of Service Requests with Severity 1-Critical, created in Jan 2011, feb 2011:
    <?count(ssServiceRequest[ssSeverity[.='1-Critical'] and xdoxslt:date_diff('d', (psfn:getCanonicalDate(ssCreated), $_XDOLOCALE, $_XDOTIMEZONE), '2011-01-31', $_XDOLOCALE, $_XDOTIMEZONE) <=31])?>
    <?count(ssServiceRequest[ssSeverity[.='1-Critical'] and xdoxslt:date_diff('d', (psfn:getCanonicalDate(ssCreated), $_XDOLOCALE, $_XDOTIMEZONE), '2011-02-28', $_XDOLOCALE, $_XDOTIMEZONE) <=28])?>
    In my xml sample data that I'm using I have 2 service requests that mean the criteria for Jan, yet when I run my report I'm getting '0'. The problem seems to be with my end of period date '2011-01-31'. I've also tried with both start and end period date (using a negative value as per your suggestion), but I still get '0':
    <?count(ssServiceRequest[ssSeverity[.='1-Critical'] and xdoxslt:date_diff('d', (psfn:getCanonicalDate(ssCreated), $_XDOLOCALE, $_XDOTIMEZONE), '2011-01-01', $_XDOLOCALE, $_XDOTIMEZONE) <=-31 and xdoxslt:date_diff('d', (psfn:getCanonicalDate(ssCreated), $_XDOLOCALE, $_XDOTIMEZONE), '2011-01-31', $_XDOLOCALE, $_XDOTIMEZONE) <=31])?>
    Many thanks,
    Claire

  • Creating report based on user selected Date Range

    Hello.
    I am trying to display an Apex report that selects data for the report based on a user entered date range.
    It's a simple page with two date picker fields (p18_start and p18_end).
    The report region SQL looks like this:
    SELECT *
    FROM prj_items
    WHERE LM_DT BETWEEN :p18_start AND :P18_end
    One table, one field on the table to search and two Apex variables.
    I thought this would be fairly simple, but I am obviously missing something.
    I not even sure what other information is needed to help me figure this out.
    -Jody

    Hi,
    You can set defaults for the datepickers if you need to - this could be done in a computation on the page for each item and conditional on the item being null.
    When I've done something similar to this, I've created two hidden page items - eg, :P19_FIRST_DATE and :P19_LAST_DATE and populated these with the earliest/latest date that the user could reasonably select (perhaps, in your case, the MIN(LM_DT) and MAX(LM_DT) values).
    Then your SQL would be:
    select * from PRJ_ITEMS
    where LM_DT BETWEEN TO_DATE(NVL(:P19_START,:P19_FIRST_DATE), 'DD-MON-YY')
    AND TO_DATE(NVL(:P19_END,:P19_LAST_DATE), 'DD-MON-YY')If you don't want to set default dates, you could do something like:
    SELECT * FROM PRJ_ITEMS
    WHERE (:P19_START IS NULL AND :P19_END IS NULL)
    OR (:P19_START IS NOT NULL AND :P19_END IS NULL AND LM_DT >= TO_DATE(:P19_START,'DD-MON-YY'))
    OR (:P19_START IS NULL AND :P19_END IS NOT NULL AND LM_DT <= TO_DATE(:P19_END,'DD-MON-YY'))
    OR (LM_DT BETWEEN TO_DATE(:P19_START,'DD-MON-YY') AND TO_DATE(:P19_END,'DD-MON-YY'))There are various reasons why your two dates are being cleared when the page is reloaded. Firstly, you should check the branch that returns to the same page - make sure you are not clearing the cache for the page. Then, have a look to see if there is a "reset page" process (usually created for you when you create a form page). Then, check the Source settings for the items. Typically, these would be "Only when current value in session state is null" and a Source Type of "Static Assignment" with the "Source Value or Expression" left empty.
    Andy

  • How get Mailbox Folder Item Count for date range?

    How to make query to Exchange 2013 like this:
    query ItemCount (specified Mailbox, specified Folder (with subfolders), specified Date Range)?
    I find this script for Exchange 2010: http://gsexdev.blogspot.ru/2012/10/item-age-sample-one-reporting-on-item.html
    This script dont work for Exchange 2013 ((

    I believe you are making the change on both the places in code, as this path version would be different in 2013
    C:\Program Files\Microsoft\Exchange\Web Services\1.2\Microsoft.Exchange.WebServices.dll"
    Cheers,
    Gulab Prasad
    Technology Consultant
    Blog:
    http://www.exchangeranger.com    Twitter:
      LinkedIn:
       Check out CodeTwo’s tools for Exchange admins
    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

  • Visual Composer: Date Range in Query

    Hi,
    While working in Visual Composer, I have come across the need to re-use the same query 20 times, but with slightly different date ranges. One way would be to create 20 copies of the same query and change the selection dates as needed on each of them. However, is it possible to provide date ranges in a query in Visual Composer? Right now its only letting me enter single values.
    Thanks
    Adeel

    Problem can be resolved by using a colon between the dates. Furthermore, the DSTR function in the expression editor can be used to form the desired dates.

  • Workday calculation for specified date range

    Hi All,
    How to count number of workdays available for given date range. And I tried below statement which is
    not working.
    SUM(CASE [Calendar].[Calendar Date]
        WHEN [Calendar].[Calendar Date].[Year] = '2005' AND [Calendar].[Calendar Date].[Month]
    = 1
        THEN [Calendar].[Calendar Date].CURRENTMEMBER.CHILDREN
        END
    , [Measures].[Work Day Flag])

    Hi bpbhhaskar,
    According to your description, you want to count the weekdays in MDX. Right?
    In this scenario, we can just aggregation days from Monday to Friday. The key should be 2 to 6. Please use the expression below:
    with
    MEMBER [Measures].[DayCount] AS
    Count
    Descendants
    [Date].[Calender].CurrentMember
    ,[Date].[Calender].[Date]
    * {[Date].[Day Of Week].&[2]:[Date].[Day Of Week].&[6]}
    Best Regards,
    Simon Hou
    TechNet Community Support

  • Date range in EJB QL

    I want to query based on a date range. I wrote the following EJB QL:
    "select object(a) from ActionItems as a where a.dueDate
    between ?1 and ?2"
    But when I deployed the application to Oracle's EJB server, I got the following error:
    Auto-deploying biogen.jar (No previous deployment found)... Invalid type for expression (a.dueDate BETWEEN ?1 AND ?2)
    EJB QL statement : 'select object(a) from ActionItems as a where a.dueDate between ?1 and ?2'
    EJB QL method : public abstract java.util.Collection ActionItemsLocalHome.findByDueDateRange(java.sql.Date,java.sql.Date) throws javax.ejb.FinderException
    at com.sun.ejb.ejbql.parser.EjbQLParser.parse EjbQLParser.java:218)
    at com.sun.ejb.ejbql.EjbQLDriver.parse(EjbQLDriver.java:86)
    at com.sun.ejb.sqlgen.SQLGenerator.generateSQLForEjbQLQueries(SQLGenerator.java:704)
    It works fine for a number range, but does not work for a date range.
    Any one has an idea on how to write a correct EJB QL for a query based on date range?
    Thanks.
    Jingzhi

    As far as I know EJB QL can only deal with dates in milliseconds.
    It cannot handle them as java.util.Date or java.SQL.Date

  • Analytic functions using window date range

    Here are my requirements:
    For each FLT# Get the MIN and MAX CRSG_DT within 2½ hours period into the same bucket for each day
    I am using Oracle 10gR2
    CREATE TABLE TST_ANAL
    FLT_NBR VARCHAR2(10),
    CRSG_DT DATE ,
    TNBR VARCHAR2(14)
    INSERT INTO TST_ANAL ( FLT_NBR, CRSG_DT, TNBR) VALUES (
    '0002947', TO_Date( '03/01/2007 07:31:57 PM', 'MM/DD/YYYY HH:MI:SS AM'), 'D2007070013438');
    INSERT INTO TST_ANAL ( FLT_NBR, CRSG_DT, TNBR) VALUES (
    '0002947', TO_Date( '03/01/2007 08:31:02 PM', 'MM/DD/YYYY HH:MI:SS AM'), 'D2007070013446');
    INSERT INTO TST_ANAL ( FLT_NBR, CRSG_DT, TNBR) VALUES (
    '0002947', TO_Date( '03/01/2007 05:30:34 PM', 'MM/DD/YYYY HH:MI:SS AM'), 'D2007070013440');
    INSERT INTO TST_ANAL ( FLT_NBR, CRSG_DT, TNBR) VALUES (
    '0002947', TO_Date( '03/01/2007 05:32:07 PM', 'MM/DD/YYYY HH:MI:SS AM'), 'D2007070013427');
    INSERT INTO TST_ANAL ( FLT_NBR, CRSG_DT, TNBR) VALUES (
    '0002947', TO_Date( '03/01/2007 05:32:40 AM', 'MM/DD/YYYY HH:MI:SS AM'), 'D2007070013433');
    INSERT INTO TST_ANAL ( FLT_NBR, CRSG_DT, TNBR) VALUES (
    '0002947', TO_Date( '03/01/2007 05:35:40 AM', 'MM/DD/YYYY HH:MI:SS AM'), 'D2007070013429');
    INSERT INTO TST_ANAL ( FLT_NBR, CRSG_DT, TNBR) VALUES (
    '0002947', TO_Date( '03/01/2007 07:32:45 AM', 'MM/DD/YYYY HH:MI:SS AM'), 'D2007070013434');
    INSERT INTO TST_ANAL ( FLT_NBR, CRSG_DT, TNBR) VALUES (
    '0002947', TO_Date( '03/01/2007 07:32:50 AM', 'MM/DD/YYYY HH:MI:SS AM'), 'D200707001323');
    COMMIT;
    The desired output:
    FLT_NBR     CRSG_DT     MIN     MAX Bucket
    2947     3/1/2007 5:32     3/1/2007 5:32     3/1/2007 7:32     1
    2947     3/1/2007 5:35     3/1/2007 5:32     3/1/2007 7:32     1
    2947     3/1/2007 7:32     3/1/2007 5:32     3/1/2007 7:32     1
    2947     3/1/2007 7:32     3/1/2007 5:32     3/1/2007 7:32     1
    2947     3/1/2007 17:30     3/1/2007 17:30     3/1/2007 19:31     2
    2947     3/1/2007 17:32     3/1/2007 17:30     3/1/2007 19:31     2
    2947     3/1/2007 19:31     3/1/2007 17:30     3/1/2007 19:31     2
    2947     3/1/2007 20:31     3/1/2007 20:31     3/1/2007 20:31     3
    I am sure an Analytic query is the optimal solution. I need help creating the query. So far, I have attempted to use the min() and then both First_value() over partition clause but I do not know how to specify the window clause using a logical date range to calculate the 2 1/2 hours.
    A lot of documentation states that I can use an expression for the range between but I cannot get one even compile
    Need Help or documentation that provide some assistance
    Thanks

    I can get to the min and max, but for bucket, row_number() doesn't take the same windowing logical offset.
    SQL> select flt_nbr,
      2         crsg_dt,
      3         min(crsg_dt) over (partition by flt_nbr,
      4                                         trunc(crsg_dt)
      5                            order by crsg_dt range between (2.5/24) preceding and (2.5/24) following) mn,
      6         max(crsg_dt) over (partition by flt_nbr,
      7                                         trunc(crsg_dt)
      8                            order by crsg_dt range between (2.5/24) preceding and (2.5/24) following) mx
      9  from tst_anal
    10  /
    FLT_NBR    CRSG_DT              MN                   MX
    0002947    01-MAR-2007 05:32:40 01-MAR-2007 05:32:40 01-MAR-2007 07:32:50
    0002947    01-MAR-2007 05:35:40 01-MAR-2007 05:32:40 01-MAR-2007 07:32:50
    0002947    01-MAR-2007 07:32:45 01-MAR-2007 05:32:40 01-MAR-2007 07:32:50
    0002947    01-MAR-2007 07:32:50 01-MAR-2007 05:32:40 01-MAR-2007 07:32:50
    0002947    01-MAR-2007 17:30:34 01-MAR-2007 17:30:34 01-MAR-2007 19:31:57
    0002947    01-MAR-2007 17:32:07 01-MAR-2007 17:30:34 01-MAR-2007 19:31:57
    0002947    01-MAR-2007 19:31:57 01-MAR-2007 17:30:34 01-MAR-2007 20:31:02
    0002947    01-MAR-2007 20:31:02 01-MAR-2007 19:31:57 01-MAR-2007 20:31:02
    8 rows selected.
    SQL> Had to user FIRST_VALUE and then calculate row_number() on that for bucket.
    SQL>
    SQL> select flt_nbr, crsg_dt, mn, mx, dense_rank() over (partition by flt_nbr,
      2                                                             trunc(crsg_dt)
      3                                                      order by rn) bucket
      4  from (select flt_nbr,
      5               crsg_dt,
      6               min(crsg_dt) over (partition by flt_nbr,
      7                                               trunc(crsg_dt)
      8                                  order by crsg_dt range between (2.5/24) preceding and (2.5/24) following) mn,
      9               max(crsg_dt) over (partition by flt_nbr,
    10                                               trunc(crsg_dt)
    11                                  order by crsg_dt range between (2.5/24) preceding and (2.5/24) following) mx,
    12               FIRST_VALUE(crsg_dt) over (partition by flt_nbr,
    13                                                       trunc(crsg_dt)
    14                                          order by crsg_dt range between (2.5/24) preceding and (2.5/24) following) rn
    15        from tst_anal)
    16  /
    FLT_NBR    CRSG_DT              MN                   MX                       BUCKET
    0002947    01-MAR-2007 05:32:40 01-MAR-2007 05:32:40 01-MAR-2007 07:32:50          1
    0002947    01-MAR-2007 05:35:40 01-MAR-2007 05:32:40 01-MAR-2007 07:32:50          1
    0002947    01-MAR-2007 07:32:45 01-MAR-2007 05:32:40 01-MAR-2007 07:32:50          1
    0002947    01-MAR-2007 07:32:50 01-MAR-2007 05:32:40 01-MAR-2007 07:32:50          1
    0002947    01-MAR-2007 17:30:34 01-MAR-2007 17:30:34 01-MAR-2007 19:31:57          2
    0002947    01-MAR-2007 17:32:07 01-MAR-2007 17:30:34 01-MAR-2007 19:31:57          2
    0002947    01-MAR-2007 19:31:57 01-MAR-2007 17:30:34 01-MAR-2007 20:31:02          2
    0002947    01-MAR-2007 20:31:02 01-MAR-2007 19:31:57 01-MAR-2007 20:31:02          3
    8 rows selected.
    SQL> Cheers
    Sarma.

  • Help with Date Range

    Hi,
    I have an Oracle form which allows users to enter :start_date_active(mandatory) and :end_date_active (can be null).
    I need to check in form using SQL if there already exists a record for this date range or if there is any overlapping date ranges for the value entered and disallow user from entering that.
    I have my query as follows:
    SELECT (1)
    FROM <table> xsv
    WHERE 1=1
    AND ( (:START_DATE_ACTIVE >= xsv.start_date_active) AND
    (:START_DATE_ACTIVE <= nvl(xsv.end_date_active,'31-DEC-4712'))
    OR
         (:END_DATE_ACTIVE >= xsv.start_date_active) AND
    (:END_DATE_ACTIVE <= nvl(xsv.end_date_active,'31-DEC-4712'))
    But, this incorrectly allows me to enter over lapping date ranges when the :end_date_active is null.
    It should work as follows :
    eg.
    start_date_active end_date_active
    01-Apr-2009 allowed
    01-Mar-2009 10-Mar-2009 allowed
    01-feb-2009 Not allowed, as it overlaps with 1st record
    10-feb-2009 05-Mar-2009 Not allowed, as it overlaps with 2nd record
    05-Mar-2009 20-mar-2009 Not allowed, as it overlaps with 2nd record
    and so on.
    How do I modify my query to deal with null end dates ?
    Many Thanks
    Shankar

    Hi, Shankar,
    Whenever you have a question, it helps to post:
    (1) The version of Oracle (and any other relevant software) you're using
    (2) A little sample data (just enough to show what the problem is) from all the relevant tables
    (3) The results you want from that data (You posted this. It would be better if it were formatted.)
    (4) Your best attempt so far (formatted) (You posted this, but since it's unformated, it's very hard to read.)
    (5) The full error message (if any), including line number
    Executable SQL statements (like "CREATE TABLE AS ..." or "INSERT ..." statements) are best for (2).
    Formatted tabular output is okay for (3). Type these 6 characters
    &#123;code&#125;
    (small letters only, inside curly brackets) before and after formatted text, to preserve spacing.
    Use different names for the parameters and the columns. For example, if the column is called start_date_active, call the corresponding parameter :p_start_date_active. It will help to keep them straight.
    In this statement, if the column end_date_active IS NULL, you're treating it as an impossibly late date:
    (:END_DATE_ACTIVE <= nvl(xsv.end_date_active,'31-DEC-4712'))That's good. (You should really use TO_DATE ('31-DEC-4712', 'DD-MON-YYYY'), though.)
    If it's possible for the parameter :end_date_active to be NULL, you should use NVL in the same way, to equate it with some appropriate date.
    The correct way to see if the range a to b (a <= b) overlaps with x to y (x <= y) is:
    WHERE   b >= x
    AND     a <= yIf you want an expression that's TRUE when they do not overlap, then say
    WHERE   NOT (    b >= x
                AND  a <= y
                )or, equivalently,
    WHERE   b < x
    OR      a > y

  • MDX Filter with date range

    Hi,
    my requirement is to create a calculated member to calculate Total unique customers who has sales > 0 within the date range.
    Below mdx works normally with single date
    DistinctCount(FILTER([Customer_Sales].[Outlet ID].[Outlet ID].members,
    ([Measures].[distribution],
    [Date].[CalendarWeek].CurrentMember
    )=1))
    I'm looking for something like below with date range,
    DistinctCount(FILTER([Customer_Sales].[Outlet ID].[Outlet ID].members,
    ([Measures].[distribution],
    WTD([Date].[CalendarWeek].CurrentMember
    ))=1))
    Above MDX fails with the error: String of numeric expression expected, Tuple set expression was used.
    Appreciate your immediate response.
    Thanks in advance

    Hi Chandima,
    Thanks for the response.
    I tried your code, it works but the results are not correct.  As per manual calculations, there are 28 unique customers who has positive sales on Week to date (2014-11-03), but result shows only 19.
    For the first day of week (2014-11-01), there are 9 unique customers, which is correct. But for the following days it is not giving correct result.
    Further, performance of this approach is very poor
    Thanks,

  • Search by date range

    This should be simple but I cannot get it to work. Trying to
    construct a page where the user enters a start date & an end
    date & we display results.
    I am using :
    SELECT *
    FROM AVRmonth
    WHERE ExpiryDate BETWEEN #varStart# AND #varEnd#
    In the Variables editor I have:
    varStart % Request("startFld")
    varEnd % Request("endFld")
    This fails to work, DW gives the error of "Syntax error in
    query expression 'ExpiryDate BETWEEN #%# AND #%#
    If I change default values to be a date, eg: #1/1/04 DW gives
    no error but query does not work
    If I use no variables but just use :
    SELECT *
    FROM AVRmonth
    WHERE ExpiryDate BETWEEN #01/01/04# AND #01/06/05#
    It works & displays results from that date range.
    I think I have tried all combinations of using # ' to
    surround variable names but still no joy.
    I am sure this is something blindingly obvious but I cannot
    see it.
    Can anyone please help...........
    This is using MS Access 2000 database

    You could use this and all you need to change is the
    MM_NAMEOFYOURCONNECTION_STRING, look for the Dim
    MM_YOURCONNECTION_STRING in the connections folder, but this should
    work.add the <!--#include file="Connections/YOURCONN.asp" -->
    from the top of your page. You can make this recordset from the
    advanced button in the recordset creation wizard, there is a good
    tutorial on adobes site also search for 'dreamweaver multiple
    paramter query' for other tutorials
    http://www.adobe.com/support/ultradev/building/multiple_param_search/multiple_param_search 02.html
    <%
    Dim rsFriday__MMstart
    rsFriday__MMstart = "1"
    If (Request.Form("strtFld") <> "") Then
    rsFriday__MMstart = Request.Form("strtFld")
    End If
    %>
    <%
    Dim rsFriday__MMend
    rsFriday__MMend = "1"
    If (Request.Form("strtFld") <> "") Then
    rsFriday__MMColParam = Request.Form("endFld")
    End If
    %>
    <%
    Dim rsFriday
    Dim rsFriday_cmd
    Dim rsFriday_numRows
    Set rsFriday_cmd = Server.CreateObject ("ADODB.Command")
    rsFriday_cmd.ActiveConnection =
    MM_NAMEOFYOURCONNECTION_STRING
    rsFriday_cmd.CommandText = "SELECT * FROM AVRmonth WHERE
    ExpiryDate BETWEEN ? AND ?"
    rsFriday_cmd.Prepared = true
    rsFriday_cmd.Parameters.Append
    rsFriday_cmd.CreateParameter("param1", 135, 1, -1,
    rsFriday__MMstart) ' adDBTimeStamp
    rsFriday_cmd.Parameters.Append
    rsFriday_cmd.CreateParameter("param1", 135, 1, -1, rsFriday__MMend)
    ' adDBTimeStamp
    Set rsFriday = rsFriday_cmd.Execute
    rsFriday_numRows = 0
    %>
    put this at end of page after </body> </html>
    tags;
    <%
    rsFriday.Close()
    Set rsFriday = Nothing
    %>

  • Pass date range parameter  to SQL stored procedure.

    Hi,
    I'd like to pass a date range parameter from Crystal Reports to a sql stored procedure. Does anyone know if this is possible?
    I've had no problem passing standard datetime (single value) paramaters to and from but am struggling with getting a range value parameter to work.
    Environment: Crystal Reports 10/XI and SQL 2000 MSDE version or SQL 2005 Express Edition.
    Any help would be appreciated.

    C5112736 wrote:>
    > And then these 2 formulas 'Formula # 1' and 'Formula # 2' can be used to pass on to the stored procedure.
    Can someone please demonstrate exactly how to use formula results as date parameters to a SQL stored procedure?  Keep in mind, there are two parameters to the stored procedure.
    I have gleaned this much: Use Add Command and insert the procedure with
    EXEC ServerName.dbo.usp_sprocName;1 '{?StringParameter}'
    but if I try to do
    {CALL ServerName.dbo.usp_SprocName({@Formula1},{@Formula2})}
    then it gives the error "No value given for one or more required parameters". 
    Both of the parameters are VARCHAR(50).
    I have finally found this link: [http://msdn.microsoft.com/en-us/library/ms710248(VS.85).aspx|http://msdn.microsoft.com/en-us/library/ms710248(VS.85).aspx]
    This Microsoft site defines the format of the ODBC escape sequences, but I still do not know how to convince Crystal to insert it's parameter results or formula results.
    Pulling what's left of my hair out . . .
    ~ Shaun

  • Increasing date through Expression builder?

    Hi,
    we have requirement of validating the date range.
    The date entered should not be greater that 3 days of current(todays) date and min date should be be less that last three days.
    I am using Daterangevalidator and i need to know how to set a EL expression to satisfy the above condition.
    we have a current date in El coming from "#{bindings.startedDate.inputValue}" now i just want to know how to increase and decrease the days using EL.
    <af:validateDateTimeRange
    maximum="#{bindings.startedDate.inputValue + 3}"
         minimum="#{bindings.startedDate.inputValue - 3}"
    The above code is not working.
    Edited by: user11285758 on Apr 25, 2013 7:45 PM

    Thanks for your reply.....
    When I put above code
    <af:validateDateTimeRange
    maximum="#{bindings.startedDate.inputValue + 259200000}"
    minimum="#{bindings.startedDate.inputValue - 259200000}" />
    and deploy the application to server. page is failing while loading at that particular code. Please find error below
    ERROR:
    ]] Root cause of ServletException.
    java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key el.convert
    at java.util.ResourceBundle.getObject(ResourceBundle.java:393)
    at java.util.ResourceBundle.getString(ResourceBundle.java:353)
    at com.sun.el.util.MessageFactory.getArray(MessageFactory.java:86)
    at com.sun.el.util.MessageFactory.get(MessageFactory.java:66)
    at com.sun.el.lang.ELArithmetic.coerce(ELArithmetic.java:384)
    Truncated. see log file for complete stacktrace
    Any idea what needs to be done to fix the issue?
    Edited by: user11285758 on Apr 28, 2013 9:38 PM
    Edited by: user11285758 on Apr 28, 2013 9:39 PM

Maybe you are looking for