Trying to represent Min and Max date on a rtf. template, please help :-(

Hi all,
I'm a little bit disappointed. I make effort to write questions with the hope someone in this forum can help me, but it seems nobody has interest about it.
I try once again:
I am tryin to represent a From Date and To Date. My XML File looks like:
<ServiceRequest
<Created
08/04/2003 07:34:21</Created
<aENumber
</aENumber
<CheckResultCommentUAW
</CheckResultCommentUAW
<CheckResultCommentUAW
</CheckResultUAW
<ABCCategory
</ABCCategory
<ChargeNumber
</ChargeNumber
<ABCEndDate
</ABCEndDate
<ABCStatus
</ABCStatus
<ABCTransferStatus
</ABCTransferStatus
<ClosedDate
</ClosedDate
<ContactAccountName
FGD Enterprise</ContactAccountName
<ContactCTIFaxInbound
</ContactCTIFaxInbound
<ContactCTIPhoneOutbound
+4904217280677</ContactCTIPhoneOutbound
<ContactDepartment
</ContactDepartment
<ContactEmailAddress
[email protected]</ContactEmailAddress
<ContactFirstName
Kate</ContactFirstName
<ContactLastName
Middleton</ContactLastName
<ContactSalutation
Miss</ContactSalutation
<ContactSubject
Psychoth.</ContactSubject
<ContactTitle
</ContactTitle
<ContactType
Doctor</ContactType
<CreatorFirstName
Iris</CreatorFirstName
<CreatorName
Ramos</CreatorName
<Description
Questions about Suprare.</Description
<JoinedContactAccountId
1-L8-676</JoinedContactAccountId
<PTCNumber
</PTCNumber
<Product
Novasitin</Product
<ProductBusinessUnit
BU Winters</ProductBusinessUnit
<SRNumber
1-1043652</SRNumber
<SRType
Speciality Service Request</SRType
<SolutionDescription
WLvbf</SolutionDescription
<Status
Open</Status
<TemporaryContactName
</TemporaryContactName
<TemporaryPhoneNumber
</TemporaryPhoneNumber
<ABCDateReceived
</ABCDateReceived
<ABCLinkedProductName
Novasitin 1</ABCLinkedProductName
<ABCNoofUnitsReceived
</ABCNoofUnitsReceived
<ABCRefundReplacement
</ABCRefundReplacement
<ABCSampleStatusReceived
</ABCSampleStatusReceived
<ABCSolutionDescription
</ABCSolutionDescription
<VisitCompleteAddress
The Parskinson 3</VisitCompleteAddress
<Login
A456788</Login
<ListOfSRInternalProducts
<SRInternalProducts
<MaterialNumber
134152</MaterialNumber
<ProductName
Novasitin 1</ProductName
<BatchNumber
</BatchNumber
<ReplacementRefnd
</ReplacementRefnd
<SampleAmount
</SampleAmount
<SampleRecievedDate
</SampleRecievedDate
<SampleStatus
</SampleStatus
</SRInternalProducts
<SRInternalProducts
<MaterialNumber
KTA</MaterialNumber
<ProductName
Novasitin</ProductName
<BatchNumber
</BatchNumber
<ReplacementRefnd
</ReplacementRefnd
<SampleAmount
</SampleAmount
<SampleRecievedDate
</SampleRecievedDate
<SampleStatus
</SampleStatus
</SRInternalProducts
</ListOfSRInternalProducts
</ServiceRequest
</listOf_ssServiceRequest
As you see the date has the format 08/04/2003 07:34:21, but I want to represent it like 04.08.2003. I have this on my template:
<?xdoxslt:set_variable($_XDOCTX, ‘minYear’, xdoxslt:to_char(concat(substring(Created, 4,2), ‘.‘,substring(Created, 1, 2), ‘.‘,substring(Created, 7, 4)), ‘DD.MM.YYYY’))?>
<?xdoxslt:set_variable($_XDOCTX, ‘maxYear’, xdoxslt:to_char(concat(substring(Created, 4,2), ‘.‘,substring(Created, 1, 2), ‘.‘,substring(Created, 7, 4)), ‘DD.MM.YYYY’))?>
and the loop:
<?for-each:ServiceRequest?>
<?if: xdoxslt:date_diff(‘s’, xdoxslt:get_variable($_XDOCTX, ‘minYear’), xdoxslt:to_char(concat(substring(Created, 4,2), ‘.‘,substring(Created, 1, 2), ‘.‘,substring(Created, 7, 4)), ‘DD.MM.YYYY’), $_XDOLOCALE, $_XDOTIMEZONE) < 0 ?>
<?xdoxslt:set_variable($_XDOCTX, ‘minYear’, xdoxslt:to_char(concat(substring(Created, 4,2), ‘.‘,substring(Created, 1, 2), ‘.‘,substring(Created, 7, 4)), ‘DD.MM.YYYY’))?><?end if?>
<?if: xdoxslt:date_diff(‘s’, xdoxslt:get_variable($_XDOCTX, ‘maxYear’), xdoxslt:to_char(concat(substring(Created, 4,2), ‘.‘,substring(Created, 1, 2), ‘.‘,substring(Created, 7, 4)), ‘DD.MM.YYYY’), $_XDOLOCALE, $_XDOTIMEZONE) > 0?>
<?xdoxslt:set_variable($_XDOCTX, ‘maxYear’, xdoxslt:to_char(concat(substring(Created, 4,2), ‘.‘,substring(Created, 1, 2), ‘.‘,substring(Created, 7, 4)), ‘DD.MM.YYYY’))?><?end if?><?end for-each?>
So it gives me all the Service Request records in the time range. For example From Date: 31.01.2005 til To Date 01.02.2005.
It doesn't give me the To Date result unfortunately, it gives me the correct From Date, but as To Date the result is the same as From Date, what is false.
The results should be:
From Date: 31.01.2005
To Date: 01.02.2005
Can anybody help me? please?
Regards

I can but I was looking for a direct API use if possible here. Our library is so compilcated that I can't use the direct select statement.
Well thanks, I will be using the select max, min and further writing another API for my use.
Regards,
KP

Similar Messages

  • Global Change or filter based on Min and Max dates

    Hi Guys,
    Hopefully there is a genius out there that is an expert with filters and or global changes, I am after a solution and can’t work out if it is possible to do in P6.
    Based on a filter (using codes to select a group of activities) I want to write a value into two date UDF Fields can I:
    Run a global change to give the earliest and latest date in the group and write the result to all tasks in the group? or
    Is there a mindate maxdate option in Global change or filter? Or
    If these tasks were grouped in the activity view can a global change be written to fill down the dates that the summary level is displaying, which are essentially the min and max dates of the groups.  
    I could do this pretty easily in excel but I have over a 100 projects and doing the import one at a time is not feasible.
    I could create LOE’s but as my variables are constantly changing and due to the volume also not an option.
    Summary bars are not an option eithers as I am writing the UDF’s to get all the bars I want on one line, 
    An option for me might be to do it using Legare but I would prefer to see if I can get it done in P6 first.
    Cheers
    Rob

    Yes, you can do it in one report.
    I created a sample report from efashion:
    Year | Lines | Sales Revenue
    2001 | Accessories | $250
    2003 | Accessories | $550
    2001 | City Skirts | $1050
    2003 | City Skirts | $1150...........
    Create 2 variables 1) Count and 2) Difference:
    1) Count  as formula - =Count([Lines]) In Report
    2) Difference as formula - =Sum([Sales revenue]) Where (Max([Year]) In Report = [Year]) - Sum([Sales revenue]) Where (Min([Year]) In Report = [Year])
    You can replace the formula with your report variables. Then just drag Site ID, Count and Difference variables to your report.
    Thanks
    Jai

  • Transactions between Min and Max dates

    Hey all,
    I have a requirement to extract data between min(transdate) and max(transdate), i got to do this using a single query, i used two queries, ie. 1 select for selecting the max and min dates and my second query to get the transactions. Can some one give me an idea to solve this, as Max & Min functions are not allowed in the where clause.
    Thanks in Advance
    - Eric

    Why single fetch if you want effeciency then use analytic function
    SQL> SELECT empno,ename,hiredate FROM
      2  (SELECT empno,ename,hiredate,MAX(hiredate) OVER (ORDER BY empno) m,
      3          MIN(hiredate) OVER (ORDER BY empno) mi FROM emp)
      4  WHERE hiredate BETWEEN mi AND m;The least and greatest function returns the smallest and greatest value in a list of expressions.
    The syntax for the least function is:
    least( expr1, expr2, ... )
    Khurram

  • MIN and MAX date for each range

    Hi folks,
    I´ve got the following problem:
    Given a table
    create table t as select 'AT' OM_LANDTEXT, '12345' OM,
                             to_date('01-JAN-2004', 'DD-MON-YYYY') datum from dual
                             union
                             select 'AT' OM, '12345' OM_LANDTEXT,
                             to_date('02-JAN-2004', 'DD-MON-YYYY') datum from dual
                             union
                             select 'AT' OM, '12345' OM_LANDTEXT,
                             to_date('03-JAN-2004', 'DD-MON-YYYY') datum from dual
                             union
                             select 'AT' OM, '12345' OM_LANDTEXT,
                             to_date('05-JAN-2004', 'DD-MON-YYYY') datum from dual
                             union
                             select 'AT' OM, '12345' OM_LANDTEXT,
                             to_date('06-JAN-2004', 'DD-MON-YYYY') datum from dual
                             union
                             select 'AT' OM, '12345' OM_LANDTEXT,
                             to_date('01-FEB-2004', 'DD-MON-YYYY') datum from dual
                             union
                             select 'AT' OM, '12345' OM_LANDTEXT,
                             to_date('02-FEB-2004', 'DD-MON-YYYY') datum from dual
                             union
                             select 'AT' OM, '12345' OM_LANDTEXT,
                             to_date('03-FEB-2004', 'DD-MON-YYYY') datum from dual;
    SQL> select * from t;
    OM OM    DATUM
    AT 12345 01-JAN-04
    AT 12345 02-JAN-04
    AT 12345 03-JAN-04
    AT 12345 05-JAN-04
    AT 12345 06-JAN-04
    AT 12345 01-FEB-04
    AT 12345 02-FEB-04
    AT 12345 03-FEB-04
    8 rows selected.I need to have the first and last date for om and om_landtext for each date range (where "date range" means a set of consecutive dates with no gaps).
    So the ouput should be
    OM OM_LANDTEXT DATVON DATBIS
    AT 12345     01-JAN-04 03-JAN-04
    AT 12345     05-JAN-04 06-JAN-04
    AT 12345     01-FEB-04 03-FEB-04Any ideas...?
    Thanks for your help!
    Best regards,
    Gerd
    Message was edited by: Gerd
    Sorry, I forgot to mention this should be done in pure SQL if possible.
    [email protected]

    This is the plodding, methodical approach I've always taken, which leaves me somewhat in awe of Rod West's solution.
    SELECT om_landtext,
           om,
           MIN(datum) AS min_datum,
           MAX(datum) AS max_datum
      FROM (
    SELECT om_landtext,
           om,
           datum,
           prev_datum,
           COUNT(
             CASE
               WHEN prev_datum IS NULL THEN 'x'
               WHEN prev_datum != datum-1 THEN 'x'
               ELSE NULL
             END
           ) OVER (PARTITION BY om_landtext, om ORDER BY datum) AS grp
      FROM (
    SELECT om_landtext,
           om,
           datum,
           LAG(datum) OVER (PARTITION BY om_landtext, om ORDER BY datum) AS prev_datum
      FROM t
    GROUP BY
           om_landtext,
           om,
           grp;null

  • Ever since I have updated my software to iOS 7, I cannot download anything from the AppStore app and I have tried resetting my password and updating ITunes, but nothing works! Please help!

    Ever since I have updated my software to iOS 7, I cannot download anything from the AppStore app and I have tried resetting my password and updating ITunes, but nothing works! Also when I try to sink my mini with my iTunes account it says you cannot sync because the sync session failed to start.

    It sounds like to me you're trying to sync using the computer.
    Try these things and see if it helps before you try your next syncing session. If none of the things below work then you might consider trying to sync using iCloud only.
    Try a Restart. 
    Press and hold the Sleep/Wake button for a few seconds until the red "slide to power off" slider appears, and then slide the slider. Press and hold the Sleep/Wake button until the Apple logo appears.
     Resetting your settings
    You can also try resetting all settings. Settings>General>Reset>Reset All Settings. You will have to enter all of your device settings again.... All of the settings in the settings app will have to be re-entered. You won't lose any data, but it takes time to enter all of the settings again.
    Resetting your device
    Press and hold the Sleep/Wake button and the Home button together for at least ten seconds, until the Apple logo appears. Apple recommends this only if you are unable to restart it.
    Or if this doesn't work and nobody else on the blog doesn't have a better idea you can contact Apple. 
    Here is a link to their contacts with most of the information below. 
    http://www.apple.com/contact/

  • -How to change the Alternate Apple ID? My account has an alternate address which is NOT MINE and I need to change it. Please, help!

    -On iCloud, how can I change the Alternate Apple ID? My account has an alternate address which is NOT MINE and I need to change it ASAP. Please, help!

    Read here >  How do I change my alternate Apple ID

  • Trying to open pdf and Adobe Reader Stops Working...Please Help

    Trying to open PDF and it keeps popping up that Adobe Reader Stopped Working.  And doesn't seem to find a solution to fix.  Has been going on for a couple days.  Can't access pdf files needed for my business.

    With Reader XI I assume you mean 11.0.0; try updating to 11.0.06.
    Also, can you open Reader by itself?  If so, try to disable Protected Mode [Edit | Preferences | Security (Enhanced)].

  • The screen on my ipod touch is stuck zoomed in. I turned it off and back and its still stuck zoomed in. I also tried to reset it and that didn't work either. Please help.

    The screen on my ipod touch is stuck zoomed in. I don't know how it happened I just looked down and it was like that. I have turned it off and back and even reset it but it still keeps zooming back in each time I turn it on. I can't unlock it because I can't see the numbers and it won't let me move around the screen. Please help.

    This is asked and answered often.  The foru search bar is on the right side of this page.
    It is also covered in the manual - zoom feature:
    iPod touch User Guide (For iOS 4.3 Software)
    Double tap with three fingers.

  • Finding Min and Max date

    SELECT * FROM (
    SELECT 'STOR_A' STORE_NAME ,'BX1' BOX_NO, 'X11' LOC, '01-JAN-2010' MOVE_DT FROM DUAL UNION ALL
    SELECT 'STOR_A'  ,'BX1' , 'X21' , '03-JAN-2010'  FROM DUAL UNION ALL
    SELECT 'STOR_A'  ,'BX1' , 'X13' , '05-JAN-2010'  FROM DUAL UNION ALL
    SELECT 'STOR_A'  ,'BX1' , 'X41' , '07-JAN-2010'  FROM DUAL UNION ALL
    SELECT 'STOR_A'  ,'BX1' , 'X15' , '09-JAN-2010'  FROM DUAL UNION ALL
    SELECT 'STOR_A'  ,'BX2' , 'X31' , '02-JAN-2010'  FROM DUAL UNION ALL
    SELECT 'STOR_A'  ,'BX2' , 'X71' , '04-JAN-2010'  FROM DUAL UNION ALL
    SELECT 'STOR_A'  ,'BX2' , 'X18' , '06-JAN-2010'  FROM DUAL UNION ALL
    SELECT 'STOR_A'  ,'BX3' , 'X91' , '04-JAN-2010'  FROM DUAL UNION ALL
    SELECT 'STOR_A'  ,'BX3' , 'X10' , '05-JAN-2010'  FROM DUAL UNION ALL
    SELECT 'STOR_A'  ,'BX3' , 'X14' , '07-JAN-2010'  FROM DUAL UNION ALL
    SELECT 'STOR_A'  ,'BX3' , 'X51' , '10-JAN-2010'  FROM DUAL UNION ALL
    SELECT 'STOR_A'  ,'BX3' , 'X16' , '12-JAN-2010'  FROM DUAL UNION ALL 
    SELECT 'STOR_B'  ,'BX2' , 'X41' , '09-JAN-2010'  FROM DUAL UNION ALL
    SELECT 'STOR_B'  ,'BX2' , 'X74' , '11-JAN-2010'  FROM DUAL UNION ALL
    SELECT 'STOR_B'  ,'BX2' , 'X31' , '12-JAN-2010'  FROM DUAL UNION ALL
    SELECT 'STOR_B'  ,'BX2' , 'X68' , '17-JAN-2010'  FROM DUAL
    [pre/]
    I have the data of the Boxes which came to the store and changed the locations on a date.
    how can i select in a single row the as below. Boxwise the date and location on which received in and sent out
    [pre]
    BOX_NO     STORE_NAME     IN_LOC              IN_DATE          OUT_LOC     OUT_DATE
    BX1     STOR_A          X11          01-Jan-10     X15     09-Jan-10
    BX2     STOR_A          X31          02-Jan-10     X18     06-Jan-10
    BX3     STOR_A          X91          04-Jan-10     X16     12-Jan-10
    BX2     STOR_B          X41          09-Jan-10     X68     17-Jan-10
    [pre/]
    Can someone helpout from the query                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    using aggregate keep first/last functions:
    with my_tab as (SELECT 'STOR_A' STORE_NAME ,'BX1' BOX_NO, 'X11' LOC, to_date('01-JAN-2010', 'dd-MON-yyyy') MOVE_DT FROM DUAL UNION ALL
                    SELECT 'STOR_A'  ,'BX1' , 'X21' , to_date('03-JAN-2010', 'dd-MON-yyyy')  FROM DUAL UNION ALL
                    SELECT 'STOR_A'  ,'BX1' , 'X13' , to_date('05-JAN-2010', 'dd-MON-yyyy')  FROM DUAL UNION ALL
                    SELECT 'STOR_A'  ,'BX1' , 'X41' , to_date('07-JAN-2010', 'dd-MON-yyyy')  FROM DUAL UNION ALL
                    SELECT 'STOR_A'  ,'BX1' , 'X15' , to_date('09-JAN-2010', 'dd-MON-yyyy')  FROM DUAL UNION ALL
                    SELECT 'STOR_A'  ,'BX2' , 'X31' , to_date('02-JAN-2010', 'dd-MON-yyyy')  FROM DUAL UNION ALL
                    SELECT 'STOR_A'  ,'BX2' , 'X71' , to_date('04-JAN-2010', 'dd-MON-yyyy')  FROM DUAL UNION ALL
                    SELECT 'STOR_A'  ,'BX2' , 'X18' , to_date('06-JAN-2010', 'dd-MON-yyyy')  FROM DUAL UNION ALL
                    SELECT 'STOR_A'  ,'BX3' , 'X91' , to_date('04-JAN-2010', 'dd-MON-yyyy')  FROM DUAL UNION ALL
                    SELECT 'STOR_A'  ,'BX3' , 'X10' , to_date('05-JAN-2010', 'dd-MON-yyyy')  FROM DUAL UNION ALL
                    SELECT 'STOR_A'  ,'BX3' , 'X14' , to_date('07-JAN-2010', 'dd-MON-yyyy')  FROM DUAL UNION ALL
                    SELECT 'STOR_A'  ,'BX3' , 'X51' , to_date('10-JAN-2010', 'dd-MON-yyyy')  FROM DUAL UNION ALL
                    SELECT 'STOR_A'  ,'BX3' , 'X16' , to_date('12-JAN-2010', 'dd-MON-yyyy')  FROM DUAL UNION ALL 
                    SELECT 'STOR_B'  ,'BX2' , 'X41' , to_date('09-JAN-2010', 'dd-MON-yyyy')  FROM DUAL UNION ALL
                    SELECT 'STOR_B'  ,'BX2' , 'X74' , to_date('11-JAN-2010', 'dd-MON-yyyy')  FROM DUAL UNION ALL
                    SELECT 'STOR_B'  ,'BX2' , 'X31' , to_date('12-JAN-2010', 'dd-MON-yyyy')  FROM DUAL UNION ALL
                    SELECT 'STOR_B'  ,'BX2' , 'X68' , to_date('17-JAN-2010', 'dd-MON-yyyy')  FROM DUAL)
    select box_no,
           store_name,
           min(loc) keep (dense_rank first order by move_dt) in_loc,
           min(move_dt) in_date,
           max(loc) keep (dense_rank last order by move_dt) out_loc,
           max(move_dt) out_date
    from   my_tab
    group by box_no,
             store_name
    order by store_name, box_no;
    BOX STORE_ IN_ IN_DATE             OUT OUT_DATE
    BX1 STOR_A X11 01/01/2010 00:00:00 X15 09/01/2010 00:00:00
    BX2 STOR_A X31 02/01/2010 00:00:00 X18 06/01/2010 00:00:00
    BX3 STOR_A X91 04/01/2010 00:00:00 X16 12/01/2010 00:00:00
    BX2 STOR_B X41 09/01/2010 00:00:00 X68 17/01/2010 00:00:00Edited by: Boneist on 29-Jul-2010 14:32
    Oh darn it! Too slow! {noformat}*pootles off for more caffeine*{noformat}

  • I have a 3rd generation ipod that will not connect. I keep getting an error message that says "USB Device Not Recognized".  I have tried 3 seperate cables and none of them are working.  Please help!

    It keeps telling me that one of the USB devices for this computer has malfunctioned and windows does not recognize it.  I have tried all of the ports and still am not having any luck.  I have purchased 3 brand new cables and none of them are working.  I have tried to update the driver but it says I am using the most up to date.  I have tried to reset the Ipod by holding the center button and menu button until the apple appears.  I am not sure what else to try.  Any help would be greatly appreciated.  My computer is Windows Vista!

    Hello butterflygirlie,
    Have you tried uninstalling the driver for your iPod from within Device Manager?  After uninstalling it, go ahead and unplug your iPod and plug it back in.  Doing so should cause your system to locate the proper driver for it.
    B-rock

  • My iphone 4 keeps failing to restore at firmware update point with -1 error code - have tried on multipke computers and will not restore ??? please help

    I woke up this morning - xmas day of all days and had a message on my phone that it needed to be restored via itunes. I connected it to my laptop and it tried to restore but failed at the point of iphone firmware update. I have back-ups etc - I have tried it on two different laptops and have tried at least 10 times but keeps failinhg at the same point - has anyone else had this and found a cure or is the phone dead. Its on ios 6.0.0.1

    Error -1 could indicate a hardware issue. You may need to take the device to an Apple Store and have it looked at
    Read here > http://support.apple.com/kb/TS3694
    Sorry for the bad news

  • To Obtain Min and Max

    i am currently using labview 7.0 and working on agilent 4195A. i am working on this programme where i have to locate the min and max point from the graph so as to locate the resonance frequency. but i tried several derivatives but none of them succeed in helping me to locate my min and max. if anyone have any idea, please let me know. thank you.
    Attachments:
    mapping.vi ‏121 KB

    Hi tyl,
    well you are using LV7.1...
    I made some comments in your vi - please read the development style guide!
    Why don't you use the array min/max operation to get the strongest signal output?
    And please provide some test data - nobody here can test your vi without proper hardware, without your signal, with missing subvis...
    Message Edited by GerdW on 06-22-2007 10:30 AM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    mapping.vi ‏122 KB

  • Difference of value of a dimension based on min and max

    Database: Oracle 10g
    BO-BOXIr3
    Let me explain the exact problem again.
    As per the below code, I have the data in this format in my table:
    Code:
    Date              Site ID     KWH
    1/2/2009 00:00     IN-1     22
    1/2/2009 01:00     IN-1     28
    1/3/2009 03:00     IN-2     25
    1/3/2009 04:00     IN-2     46
    1/4/2009 00:00     IN-3     28
    1/4/2009 10:00     IN-3     34
    1/5/2009 08:00     IN-4     31
    1/5/2009 09:00     IN-4     55
    1/5/2009 11:00     IN-4     77
    1/6/2009 00:00     IN-5     34
    Now want to build a report with following columns:
    Site     Count     KWH
    IN-1     2     6 (ex.-28-22)
    IN-2     2     21
    IN-3     2     6
    IN-4     3     46 (ex.-77-31)
    IN-5     2     34
    SITE- distinct site name.
    COUNT-count is number of repetitions of site id between min and max date.
    KWH -(Delta between the min and max date)
    To get the above result I have created 3 report from different queries since not able to get these al in a single report viz Count, Max Value and Min value. Well I have all these 3 reports or table on a single page.
    Count-this report will give the count between the dates
    Max Value-this report will give me the values of kwh for max dates for each site id
    Min Value-this report will give me the values of kwh for min dates for each site id
    Now want to create a single report based on these 3 reports which contains the column
    Site|Count|KWH
    IS IT POSSIBLE?
    Or
    Is it possible to build such report in a single one with all the required column which I mentioned?
    The variables which I created to get the max & min dates,
    Mx_dt= =Max([Query 2].[Hourly]) In ([Query 2].[SITE_ID])
    Mn_dt= =Min([Query 3 (12)].[Hourly]) In ([Query 3 (12)].[SITE_ID])
    For filtering on report used following variables:
    if_st_mn=If([mn_dt])=[Hourly] Then "ok" Else "no"
    if_st_mx =If([mx_dt])=[Hourly] Then "ok" Else "no"
    will filter on "ok" to get the max and min date values.
    rest of the variable in the snap are not usable.

    Yes, you can do it in one report.
    I created a sample report from efashion:
    Year | Lines | Sales Revenue
    2001 | Accessories | $250
    2003 | Accessories | $550
    2001 | City Skirts | $1050
    2003 | City Skirts | $1150...........
    Create 2 variables 1) Count and 2) Difference:
    1) Count  as formula - =Count([Lines]) In Report
    2) Difference as formula - =Sum([Sales revenue]) Where (Max([Year]) In Report = [Year]) - Sum([Sales revenue]) Where (Min([Year]) In Report = [Year])
    You can replace the formula with your report variables. Then just drag Site ID, Count and Difference variables to your report.
    Thanks
    Jai

  • MIN and MAX datetimes ti find  range

    I am using Oracle 11g version
    create table re(Name char(20),Datetime char(45),val1 number);
    insert into re values('abc','10/29/2012 13:00','1.5')
    insert into re values('abc','10/29/2012 13:05','1.5')
    insert into re values('abc','10/29/2012 13:10','1.5')
    insert into re values('abc','10/29/2012 13:15','1.5')
    insert into re values('abc','10/29/2012 13:20','0.00')
    insert into re values('abc','10/29/2012 13:25','0.00')
    insert into re values('abc','10/29/2012 13:30','0.00')
    insert into re values('abc','10/29/2012 13:35','0.00')
    insert into re values('abc','10/29/2012 13:40','2.1')
    insert into re values('abc','10/29/2012 13:45','2.3')
    insert into re values('abc','10/29/2012 13:50','2.1')
    insert into re values('abc','10/29/2012 13:55','2.1')
    insert into re values('abc','10/29/2012 14:00','2.2')
    O/P:
    In this way data is stored in database.Needed output is, I want the datetime column data range with min and max values where val1>0 only.
    Expected result while we consider the above data is::
    Name mintime maxtime
    abc 10/19/2012 13:00 10/19/2012 13:15
    abc 10/29/2012 13:40 10/29/2012 14:00
    For this I tried something like this,
    select name, min(to_date(Datetime ,'mm/dd/yyyy hh24:mi')) start, max(to_date(Datetime ,'mm/dd/yyyy hh24:mi')) end from (
    select name, Datetime ,to_date(Datetime ,'mm/dd/yyyy hh24:mi') - rank() over (partition by loc_name order by t1 asc) Val_col from re where val1 > 0
    ) group by lname, Val_col
    but I am getting the output like this for above query.
    name start end
    abc 10/29/2012 13:00 10/29/2012 13:00
    abc 10/29/2012 13:05 10/29/2012 13:05
    so.on.
    Edited by: 913672 on Apr 3, 2013 3:07 AM

    913672 wrote:
    I am using Oracle 11g version
    create table re(Name char(20),Datetime char(45),val1 number);
    insert into re values('abc','10/29/2012 13:00','1.5')
    insert into re values('abc','10/29/2012 13:05','1.5')
    insert into re values('abc','10/29/2012 13:10','1.5')
    insert into re values('abc','10/29/2012 13:15','1.5')
    insert into re values('abc','10/29/2012 13:20','0.00')
    insert into re values('abc','10/29/2012 13:25','0.00')
    insert into re values('abc','10/29/2012 13:30','0.00')
    insert into re values('abc','10/29/2012 13:35','0.00')
    insert into re values('abc','10/29/2012 13:40','2.1')
    insert into re values('abc','10/29/2012 13:45','2.3')
    insert into re values('abc','10/29/2012 13:50','2.1')
    insert into re values('abc','10/29/2012 13:55','2.1')
    insert into re values('abc','10/29/2012 14:00','2.2')
    O/P:
    In this way data is stored in database.Needed output is, I want the datetime column data range with min and max values where val1>0 only.
    Expected result while we consider the above data is::
    Name mintime maxtime
    abc 10/19/2012 13:00 10/19/2012 13:15
    abc 10/29/2012 13:40 10/29/2012 14:00
    For this I tried something like this,
    select name, min(to_date(Datetime ,'mm/dd/yyyy hh24:mi')) start, max(to_date(Datetime ,'mm/dd/yyyy hh24:mi')) end from (
    select name, Datetime ,to_date(Datetime ,'mm/dd/yyyy hh24:mi') - rank() over (partition by loc_name order by t1 asc) Val_col from re where val1 > 0
    ) group by lname, Val_col
    but I am getting the output like this for above query.
    name start end
    abc 10/29/2012 13:00 10/29/2012 13:00
    abc 10/29/2012 13:05 10/29/2012 13:05
    so.on.Firstly and most importantly do NOT store dates as char columns: that's what the DATE type is for.
    Secondly, i'm not sure how you get your output from the input, particularly as your SQL contains 'partition by loc_name' which
    doesn't even exist in your example table.
    Why has the same name got two rows with those min/max times. Are you partitioning by val1?

  • After installing Version 5 I get an error message about incompatibility and min and max versions.

    I shutdown Zone Alarm, and deleted the contents of the file, which contained the "exe" file, then reinstalled Firefox version 5.0. I still get the XUL Runner error message about incompatibility of Version 5.0 with min and max 5.0.1. What next?

    The updater wasn't able to update all the files and some were left as older versions.<br />
    You need to do a clean reinstall.
    Download a fresh Firefox copy and save the file to the desktop.
    * Firefox 5.0.x: http://www.mozilla.com/en-US/firefox/all.html
    * Uninstall your current Firefox version.
    * Do not remove personal data when you uninstall the current version.
    Remove the Firefox program folder before installing that newly downloaded copy of the Firefox installer.
    * It is important to delete the Firefox program folder to remove all the files and make sure that there are no problems with files that were leftover after uninstalling.
    Your bookmarks and other profile data are stored elsewhere in the Firefox Profile Folder and won't be affected by a reinstall, but make sure that you do not select to remove personal data if you uninstall Firefox.
    * http://kb.mozillazine.org/Profile_folder_-_Firefox
    * http://kb.mozillazine.org/Profile_backup

Maybe you are looking for

  • New item icon in iCal suddenly appears and don't how to get rid of it.

    I have a little number 1 in my iCal next to my Home calendar on the left side of iCal. It resembles the little number 1 I'd get in the Mail program if I had one new email. I have no idea where it came from and want it GONE. Can you help?

  • Help can not download itunes 7, keep getting message saying

    HKEY-LOCAL-MACHINE\SOFTWARE\CLASSES\QUICKTIMEPLAYERLIB.QUICKTIMEPLAYERAPP\CLSID. VERIFY THAT YOU HAVE ACCESS TO THAT KEY? WHAT!HAVE TRIED CALLING APPLE CAN NOT HEAR A WORD THEY SAY, ANY IDEAS ANY ONE I AM GOING MAD HELP!   Windows XP  

  • In FCE why is the video and audio separating

    all of a sudden why is the audio and video splitting when I drop the clip in the time line in FCE HD

  • Cloning EBS 11i AIX 5L

    Hi Friends, I am cloning EBS 11i AIX 5L on the same server. Currently we have EBS 11i PROD on the server, @user oracle. I want to clone it to EBS 11i TEST on the same server, @user oracle2. Things I did: 1. run autoconfig 2. run preclone programs 3.

  • ConfigurationException

    Hi, I am getting the following error when I try to login into the portal. I am able to see the first page on the portal. As I try to login, it throws the following exception. <Feb 21, 2002 5:17:36 PM IST> <Error> <Webflow> <Error while parsing uri /p