Date question modified

Please help me ASAP
what I want is the no. of hh:mi:ss that has elapsed between two
given dates
Date1 08-DEC-2001 15:12:22
Date2 09-DEC-2001 11:15:24
Sorry I was little confused.
Thanks in advance for the replies

I am too lazy to format the query for you.
But this is what i use. Basic is difference of two dates gaives
you a difference in days. Multiply it by 24*60*60 to get secs ,
or by 24 to get hours etc. remember to truncate the values.
select 'AUDIT_RUN_TIME ==> '||TO_CHAR(TRUNC(((86400*(finish_date
start_date))/60)/60),'09')||':'||TO_CHAR(TRUNC(MOD(((86400*(finish_date
- sta
rt_date))/60),60)),'09')||':'||TO_CHAR(TRUNC(MOD(MOD(((86400*(finish_date
- start_date))/60),60),1)*60),'09') FROM c_audit_timing

Similar Messages

  • Load Rule validates, yet no data values modified

    The load rule worked on a server running an NT operating system with essbase version 6.1.3. I rebuilt the application on a server running W2k with an essbase version 6.1.6. The load rule validates on the new server. The load looks as if it is loading correctly. When I check out the log file, it shows a warning number 1003035 with a message stating "No data values modified by load of this data file." Any ideas??? Creating a new load rule from scratch did not work. My next plan of attack is to check out the actual txt file to see if anything looks odd.

    Have you got any record select or record reject statements in your rules?

  • When I import photos taken from my Windows PC using a flash drive, the photos in iPhoto are dated as the date last modified on PC instead of date picture taken.

    When I import photos to my iMac, taken from my Windows PC using a flash drive, the photos in iPhoto are dated as the date last modified on PC instead of date picture taken.

    Then you need to ask a PC forum how to export the photos there to include the Metadata (specifically the EXIF data)
    If there is valid EXIF data iPhoto uses it (the EXIF data is originally added to the photo by the digital camera) and if there is no EXIF data then the only inofrmaiton IPhoto have available is the file metadata and that is what is used
    You can correct the dates in iPhoto using the batch change data/time command
    LN

  • Putting Date Last Modified on PDF

    Is there a way to put the date last modified on a PDF using Javascript? I am trying to organize a folder of PDF maps and the only way I can think of to do it is to print out each map with its file name and date last modified (so we can come back to the folder and delete the duplicates and the really old ones).
    The wonderful thread Print File Name with PDF Document has helped me figure out how to put the file name and current date into each pdf as a footer, but when I tried to edit the code to get the date last modified, I get an error.
    I will admit that I am a newbie when it comes to Javascript, so any suggestions would be extremely helpful.
    My code is as follows:
    // SetRemoveFooter
    app.addSubMenu({ cName: "Footer",cUser: "Set/Remove Footer", cParent: "File", nPos: 20 });
    app.addMenuItem({ cName: "Set Date Time (Filename)", cParent: "Footer", cExec: "SetFooter(1)"});
    app.addMenuItem({ cName: " -> Set Date .... centered", cParent: "Footer", cExec: "SetFooter(2)"});
    app.addMenuItem({ cName: " -> Set Date .... right", cParent: "Footer", cExec: "SetFooter(3)"});
    app.addMenuItem({ cName: "Set Page ", cParent: "Footer", cExec: "SetFooter(4)"});
    app.addMenuItem({ cName: "Set Both", cParent: "Footer", cExec: "SetFooter(5)"});
    app.addMenuItem({ cName: "-------------------------------", cParent: "Footer",cExec: "{}"});
    app.addMenuItem({ cName: "Remove Both", cParent: "Footer", cExec: "RemoveFooter(5)"});
    app.addMenuItem({ cName: "Remove Date Time (Filename)", cParent: "Footer", cExec: "RemoveFooter(1)"});
    app.addMenuItem({ cName: "Remove Page", cParent: "Footer", cExec: "RemoveFooter(4)"});
    //Set/remove Footer
    function SetFooter(ARG)
    var FileNM = this.documentFileName
    var AcDate = document.lastModified
    var AcDateFormat = "yyyy/mmm/dd HH:MM"
    var Box2Width = 50
    for (var p = 0; p < this.numPages; p++)
    var aRect = this.getPageBox("Crop",p);
    var TotWidth = aRect[2] - aRect[0]
    if (ARG<=3 || ARG==5)
    {var fd = this.addField("xftDate", "text", p, [30,15, TotWidth-30-30,30]);
    fd.value = util.printd(AcDateFormat, AcDate) + " (" + FileNM +")";
    fd.textSize=6; fd.readonly = true;
    if (ARG==1){ fd.alignment="left" };
    if (ARG==2){ fd.alignment="center" };
    if (ARG==3){ fd.alignment="right" };
    if (ARG==4 || ARG==5)
    {var bStart=(TotWidth/2)-(Box2Width/2)
    var bEnd=((TotWidth/2)+(Box2Width/2))
    var fp = this.addField(String("xftPage"+p+1), "text", p, [bStart,30,bEnd,15]);
    fp.value = "Page: " + String(p+1)+ "/" + this.numPages;
    fp.textSize=6; fp.readonly = true;
    fp.alignment="center";
    function RemoveFooter(ARG)
    if (ARG<=3 || ARG==5) {var x = this.removeField("xftDate");}
    if (ARG==2 || ARG==5) {for (var p = 0; p < this.numPages; p++)
    var x = this.removeField(String("xftPage"+p+1)); }
    Everything worked wonderfully until I added the line var AcDate = document.lastModified
    Is there a simple solution or is this a much more complicated problem?
    Thanks!

    You need to use:
    this.info.ModDate
    To get the date the opened PDF was last modified.

  • Generate Report Get Data to Modify.vi produces an error code 97

    The "Generate Report Get Data to Modify.vi" produces error 97. I found some help regarding "font style.vi". The recommendation was to recompile the VI, but it didn´t work. Also to change the property node to a different property and back to the original didn´t work, too.

    You hit the big solutions. Have you been able to isolate where in the VI the problem occurs? You will probably have to dig in the subVIs. Also do you see this problem if you install on another computer? Consider also reinstalling LabVIEW and Office if you are using the toolkit.

  • Show popup message if data is modified while moving to other screen

    Hi,
    We are using Jdeveloper 11.1.1.4.0,
    If any data is modified in the current page and without clicking save button, we have to show a message like ‘Do you want to save the modified data’,
    while navigating to another page or closing the browser.
    How do we get to know whether the data is modified or not?
    Regards,
    Vijay
    Edited by: Vijayakumar Palanisamy on Dec 1, 2011 10:35 PM

    Hi,
    There is an out of the box behavior that understands the uncommitted data when leaving the page.
    It is the uncommitted data behavior
    http://www.oracle.com/technetwork/developer-tools/adf/unsaveddatawarning-100139.html
    However, this is a warning that will not commit any values.
    In order to do that, you have to do it manually, as far as I know ofcourse.
    One way is to get the Application Module, get the Transaction and check if it isDirty.
    If it is, show a custom popup with what ever you want.
    You can apply this in all the cases of navigation you want.
    Regards,
    Dimitris.

  • After Generate Report Get Data to Modify.vi, the unbundle doesn't work right.

    I'm fairly new to the program, interning at a local company.  I activated LabVIEW 8.5 on two additional computers right as rain, but for some reason, on one of them, certain VIs, such as excel.llb\append report data (str).vi, do not execute.  The broken arrow points to the unbundle by names, which take place after a Generate Report Get Data to Modify.vi .  I took a look at the online evaluation version of LabVIEW 8.5 on the NI website, but the only differences between the working block diagrams online and the ones on my computer are that the ones on my computer don't have blue names.  I clicked on the names online and several options appeared.  I clicked on the names in the VI block diagram on my computer, and it didn't even have the option that it had by default.  It's like the Get Data to Modify isn't passing any, or the right information. 
    Additional info:  I had this problem on the other computer, but I just re-copied the files and it worked fine.  That didn't happen with this one.  Also, the same version of Office is installed on both of them.  The biggest difference between that desktop and my work laptop is just that the desktop had the instruments I'm working with attached to it already.  Could that be it?

    Hello,
    Are you sure that you have the Report Generation Toolkit completely installed on the computer where you are seeing the issue?  This may be available in the evaluation version, but not in your copy if you have not purchased it. 
    Also, I cannot find any VI titled excel.llb\Excel excel.llb\append report data (str).vi, could you double check this name so that others can help you out?  If you do not have full functionality, I would assume that not all of the components are installed completely.
    Kameralina
    Ask NI (ni.com/ask)
    Search The KnowledgeBase
    NI Developer Zone
    Measure It. Fix It. ni.com/greenengineering/
    NI Vision ni.com/vision/

  • How to autofill the Modified Date And Modified User?

    hi All,
    Below is the screenshot of my form , if we look at the last 4 columns we have Created Date,Created User Id which is popped up automatically if a new entry is being created. Now if we look at the last 2 ModifiedDate and ModifiedUserId those fileds will be
    empty wile creating a new entry which is good for me. But lets say if i go back to any existing record and want to modify it then the modified date and modified userid must be popped up with that persons name and current date. I think i can use the logic i
    have to get date and userid but i want some help with code to how to make the modified fields fill up.
    Can someone please help me with this?
    Thanks a lot for all your time and support.

    well I use it all the time, and have no problem in that initially both the 'started' and the 'modified' date fields have the same value..... because when one is editing a record whether initially putting in data or adding/changing later - they are both considered
    to put the form in a dirty state.
    then in future edits only the modified date field changes.  the code in the OnDirty event is:
    me.ModifiedDateFieldName=Now()
    any other approach will be more difficult to achieve as essentially one must trigger it not universally at the OnDirty event but something more specific such as at every control

  • Why every GOOP "Get Data to Modify" is set as reentrant?

    Hello All
    I found out that in every GOOP programs like e.g. "report generation" the vi "Get Data to Modify" is set as reentrant.
    Can somebody explain to me why it is so?
    thanks
    Pawel

    Hi Pawel,
    The reason for the "Get Data Modify.vi" to be reentrant is that if you for example have two parallel executing VI which both tries to access and lock the attributes of the same object, one will successfully lock the attributes and continue execution. The other VI will be forced to wait until the attributes are unlock again. The Get Data To Modify for this will the will "get stucked" and not finishing executing until the attributes are unlocked or the timeout occurs (compare with a LabVIEW semaphore).
    Further, if you have another VI executing in parallel to the situation described above (totally three parallel activities) and this code tries to lock and modify another object of the same class. If the Get Data To Modify VI wasn't reentre
    nt, this VI should be forced to wait until the Get Data To Modify finished executing for the first situation, actuall the second object is forced to wait on the first objects attributes to be unlocked! This is not the case if the Get Data To Modify is reentrant, the second objects attributes could then be locked immediatly and the execution continues as expected.
    Regards,
    Mattias Ericsson
    Endevo
    Main developer of the GOOP Inheritance Toolkit
    (please visit http://www.endevo.se/default.asp?lang=eng for more information about the new toolkit).

  • Create a "Date" class & modify, ouput incorrect - why?

    hi,
    Would you mind explaining to me what i did wrong with my code...
    when i run the main() i get:
    ..today . : . tomorrow
    mm/dd/yyyy : mm/dd/yyyy
    12/28/1949 : 00/29/0000
    12/29/1949 : 00/29/0000
    12/30/1949 : 00/29/0000
    12/31/1949 : 00/29/0000
    12/32/1949 : 00/29/0000
    12/33/1949 : 00/29/0000
    Modify the Date class of Fig.8.8 to:
    provide a method nextDay to increment the day by one. The Date object should remain in a constant state. Write a driver program that test the nextDate method in a loop.
    // Fig. 8.8: Date.java
    // Declaration of the Date class.
    //package com.deitel.jhtp3.ch08;
    import javax.swing.JOptionPane;
    public class Date extends Object {
       private int month;  // 1-12
       private int day;    // 1-31 based on month
       private int year;   // any year
       private int nextMonth;  // 1-12
       private int nextDay;    // 1-31 based on month
       private int nextYear;   // any year
       // Constructor: Confirm proper value for month;
       // call method checkDay to confirm proper
       // value for day.
       public Date( int mn, int dy, int yr )
              month = checkMonth( mn );      // validate the month
          year  = checkYear( yr );       // validate the year
          day   = checkDay( dy );        // validate the day
          nextDay = nextDate( month,day,year);
          System.out.println(
             "Date object constructor for date " + toString() );
         //utility method to check month
         private int checkMonth( int testMonth )
              if ( testMonth > 0 && testMonth <= 12 ) // validate the month
             month = testMonth;
          else {
             month = 1;
             System.out.println( "Month " + testMonth +
                                " invalid. Set to month 1." );
          return testMonth;  // leave object in consistent state
         //utility method to check year
         private int checkYear( int testYear )
              if ( testYear > 0 && testYear <= 2002 )
             year = testYear;
          else {
             year = 2002;
             System.out.println( "Year " + testYear +
                                " invalid. Set to year 2002." );
          return testYear;  // leave object in consistent state
       // Utility method to confirm proper day value
       // based on month and year.
       private int checkDay( int testDay )
          int daysPerMonth[] = { 0, 31, 28, 31, 30,
                                 31, 30, 31, 31, 30,
                                 31, 30, 31 };
          if ( testDay > 0 && testDay <= daysPerMonth[ month ] )
             return testDay;
          if ( month == 2 &&   // February: Check for leap year
               testDay == 29 &&
               ( year % 400 == 0 ||
                 ( year % 4 == 0 && year % 100 != 0 ) ) )
             return testDay;
          System.out.println( "Day " + testDay +
                              " invalid. Set to day 1." );
          return 1;  // leave object in consistent state
         private int nextDate( int mon, int da, int yer )
              //add one to day
              //does it start the next month
              //does it start the next year
          int daysEaMonth[] = { 0, 31, 28, 31, 30,
                                 31, 30, 31, 31, 30,
                                 31, 30, 31 };
              nextDay = da + 1;
                   if ( nextDay > daysEaMonth[month]){
                      nextDay = 1;
                      if (mon == 12)
                         nextMonth = 1;
                      else
                         nextMonth = mon + 1;
                      if (nextMonth == 1) nextYear = year + 1;
                   }//end of if nextDay
          return nextDay;
       // Create a String of the form month/day/year
       public String toString()
          { return month + "/" + day + "/" + year +
                   " : " + nextMonth + "/" + nextDay + "/"
                    + nextYear + "\n" ; }
    public static void main( String args[] )
       {   String result = "";
              //Date c = new Date();
          Date d = new Date( 12, 28, 1949 );
          //Date e = new Date( 7, 24, 1949 );
          for (int x = 1; x<6; x++ ){
                   d.day++;
                   result = result + d.toString();
          JOptionPane.showMessageDialog( null,
             //e.toString()+ d.toString(),
             result,
             "Testing Date Class",
             JOptionPane.INFORMATION_MESSAGE );
          System.exit( 0 );
    }//end of class Date
    *****************************************************************/

    ok, will change...
    Question regarding
    "You're not setting the values of nextMonth or nextYear anywhere."
    but i have class variables.....
    private int nextMonth; // <dont these values get assigned from the
    private int nextDay; // <function "nextDate", i mean, heck i thot
    private int nextYear; // <if they were class var's i could assign val
    private int nextDate( int mon, int da, int yer )
         nextDay = da + 1;
         if ( nextDay > daysEaMonth[month]){
            nextDay = 1;
            if (mon == 12)
               nextMonth = 1;
            else
               nextMonth = mon + 1;
            if (nextMonth == 1) nextYear = year + 1;

  • Strange Matrix group by date question

    I have the following data:
    name
    date
    value
    bob
    1/1/2015
    5
    jane
    1/1/2015
    7
    jim
    1/1/2015
    9
    bob
    1/2/2015
    2
    jane
    1/2/2015
    5
    jim
    1/2/2015
    5
    bob
    1/2/2015
    4
    I am using a matrix with a group by date to produce the following:
    1/1/2015
    1/2/2015
    bob
    5
    4
    jane
    7
    5
    jim
    9
    5
    As you can see it only selected one value for bob on 1/2.
    Is is possible to show all of the values while still grouping by date?
    I would  prefer something like 
    1/1/2015
    1/2/2015
    1/2/2015
    bob
    5
    2
    4
    jane
    7
    5
    jim
    9
    5

    Hi ,
    I have created sample report based on your question. Steps are listed below:-
    Sample query is modified to get one more Column rowid as shown in below SQL query:-
    select *,row_number() over(partition by name,date order by date )rowid from
    SELECT 'bob' name, '1/1/2015' date ,5 value
    UNION
    SELECT 'jane' , '1/1/2015' , 7
    UNION
    SELECT 'jim' , '1/1/2015' , 9
    UNION
    SELECT 'bob' , '1/2/2015' , 2
    UNION
    SELECT 'jane' , '1/2/2015' , 5
    UNION
    SELECT 'jim' , '1/2/2015' , 5
    UNION
    SELECT 'bob' , '1/2/2015' , 4
    )T
    Now Create the matrix report rows --> Name
    Columns---> Date
    Detail---> Value
    After creation of matrix, just go to the Group Properties of Column group and add as shown below
    After this setting , run the report, it will give result as shown below:-
    RDL Code for reference:-
    <?xml version="1.0" encoding="utf-8"?>
    <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
    <Body>
    <ReportItems>
    <Tablix Name="matrix1">
    <TablixCorner>
    <TablixCornerRows>
    <TablixCornerRow>
    <TablixCornerCell>
    <CellContents>
    <Textbox Name="textbox3">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value />
    <Style>
    <FontFamily>Tahoma</FontFamily>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>textbox3</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCornerCell>
    </TablixCornerRow>
    </TablixCornerRows>
    </TablixCorner>
    <TablixBody>
    <TablixColumns>
    <TablixColumn>
    <Width>1in</Width>
    </TablixColumn>
    </TablixColumns>
    <TablixRows>
    <TablixRow>
    <Height>0.21in</Height>
    <TablixCells>
    <TablixCell>
    <CellContents>
    <Textbox Name="textbox2">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Sum(Fields!value.Value)</Value>
    <Style>
    <FontFamily>Tahoma</FontFamily>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>textbox2</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    <DataElementOutput>Output</DataElementOutput>
    </TablixCell>
    </TablixCells>
    </TablixRow>
    </TablixRows>
    </TablixBody>
    <TablixColumnHierarchy>
    <TablixMembers>
    <TablixMember>
    <Group Name="matrix1_date">
    <GroupExpressions>
    <GroupExpression>=Fields!date.Value</GroupExpression>
    <GroupExpression>=Fields!rowid.Value</GroupExpression>
    </GroupExpressions>
    </Group>
    <SortExpressions>
    <SortExpression>
    <Value>=Fields!date.Value</Value>
    </SortExpression>
    </SortExpressions>
    <TablixHeader>
    <Size>0.21in</Size>
    <CellContents>
    <Textbox Name="date">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Fields!date.Value</Value>
    <Style>
    <FontFamily>Tahoma</FontFamily>
    <FontWeight>Bold</FontWeight>
    <Color>White</Color>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>date</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <BackgroundColor>#6e9eca</BackgroundColor>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixHeader>
    <DataElementOutput>Output</DataElementOutput>
    <KeepTogether>true</KeepTogether>
    </TablixMember>
    </TablixMembers>
    </TablixColumnHierarchy>
    <TablixRowHierarchy>
    <TablixMembers>
    <TablixMember>
    <Group Name="matrix1_name">
    <GroupExpressions>
    <GroupExpression>=Fields!name.Value</GroupExpression>
    </GroupExpressions>
    </Group>
    <SortExpressions>
    <SortExpression>
    <Value>=Fields!name.Value</Value>
    </SortExpression>
    </SortExpressions>
    <TablixHeader>
    <Size>1in</Size>
    <CellContents>
    <Textbox Name="name">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Fields!name.Value</Value>
    <Style>
    <FontFamily>Tahoma</FontFamily>
    <FontWeight>Bold</FontWeight>
    <Color>White</Color>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>name</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <BackgroundColor>#6e9eca</BackgroundColor>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixHeader>
    <DataElementOutput>Output</DataElementOutput>
    <KeepTogether>true</KeepTogether>
    </TablixMember>
    </TablixMembers>
    </TablixRowHierarchy>
    <RepeatColumnHeaders>true</RepeatColumnHeaders>
    <RepeatRowHeaders>true</RepeatRowHeaders>
    <DataSetName>DataSet1</DataSetName>
    <Top>0.37in</Top>
    <Height>0.42in</Height>
    <Width>2in</Width>
    <Style />
    </Tablix>
    <Textbox Name="textbox1">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>Strange Matrix Group by Date</Value>
    <Style>
    <FontFamily>Tahoma</FontFamily>
    <FontSize>14pt</FontSize>
    <FontWeight>Bold</FontWeight>
    <Color>SteelBlue</Color>
    </Style>
    </TextRun>
    </TextRuns>
    <Style>
    <TextAlign>Center</TextAlign>
    </Style>
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>textbox1</rd:DefaultName>
    <Height>0.37in</Height>
    <Width>5in</Width>
    <ZIndex>1</ZIndex>
    <Style>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </ReportItems>
    <Height>1.04in</Height>
    <Style />
    </Body>
    <Width>5in</Width>
    <Page>
    <LeftMargin>1in</LeftMargin>
    <RightMargin>1in</RightMargin>
    <TopMargin>1in</TopMargin>
    <BottomMargin>1in</BottomMargin>
    <Style />
    </Page>
    <AutoRefresh>0</AutoRefresh>
    <DataSources>
    <DataSource Name="DataSource1">
    <DataSourceReference>DataSource1</DataSourceReference>
    <rd:SecurityType>None</rd:SecurityType>
    <rd:DataSourceID>b2ebe046-5f1b-45c9-82e7-5baa7ed2460a</rd:DataSourceID>
    </DataSource>
    </DataSources>
    <DataSets>
    <DataSet Name="DataSet1">
    <Query>
    <DataSourceName>DataSource1</DataSourceName>
    <CommandText> select *,row_number() over(partition by name,date order by date )rowid from
    SELECT 'bob' name, '1/1/2015' date ,5 value
    UNION
    SELECT 'jane' , '1/1/2015' , 7
    UNION
    SELECT 'jim' , '1/1/2015' , 9
    UNION
    SELECT 'bob' , '1/2/2015' , 2
    UNION
    SELECT 'jane' , '1/2/2015' , 5
    UNION
    SELECT 'jim' , '1/2/2015' , 5
    UNION
    SELECT 'bob' , '1/2/2015' , 4
    )T</CommandText>
    <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
    </Query>
    <Fields>
    <Field Name="name">
    <DataField>name</DataField>
    <rd:TypeName>System.String</rd:TypeName>
    </Field>
    <Field Name="date">
    <DataField>date</DataField>
    <rd:TypeName>System.String</rd:TypeName>
    </Field>
    <Field Name="value">
    <DataField>value</DataField>
    <rd:TypeName>System.Int32</rd:TypeName>
    </Field>
    <Field Name="rowid">
    <DataField>rowid</DataField>
    <rd:TypeName>System.Int64</rd:TypeName>
    </Field>
    </Fields>
    </DataSet>
    </DataSets>
    <Language>en-US</Language>
    <ConsumeContainerWhitespace>true</ConsumeContainerWhitespace>
    <rd:ReportUnitType>Inch</rd:ReportUnitType>
    <rd:ReportID>dfd8f7e8-fcc1-4636-991e-d86824825c30</rd:ReportID>
    </Report>
    Thanks
    Prasad
    Mark this as Answer if it helps you to proceed on further.

  • Quick Date Question

    I'm working on a system with a lot of date validations. The validations that I built work fine as long as someone uses the correct format. The code that I'm using is:
    DECLARE
    DATE_CHECK DATE;
    DOB_CHECK DATE;
    BEGIN
    BEGIN
    DOB_CHECK := to_date(:P32_DOB, 'MM/DD/YYYY');
    DATE_CHECK := to_date(:P32_DI_UR_DT, 'MM/DD/YYYY');
    IF DOB_CHECK > DATE_CHECK
    THEN
    RETURN 'Urine condition onset date cannot occur before birth date.';
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    RETURN 'Urine condition onset date not a valid date.';
    END;
    END;
    Like I said. This works correctly, as long as someone uses the four-digit year. If they only use a two-digit year (08/04/09) it keeps throwing the error that it is occurring before the birth date.
    I have used JavaScript in other programs so that I could automatically format any date that is put in to the format that I want. The problem is that I can't use that functionality in this case because it will create an infinite loop.
    So, my question is this: How can I isolate the year of the date in PL/SQL so that I can add either 19 or 20 to the beginning of the year so that it conforms to the format I'm using?
    Thanks in advance.
    Josh

    I would strongly advise a javascript validation to check the four digit year was supplied.
    However the modified code below adds 19 or 20 to the input year.
    But what if your software will beyond 2100?
    Or what if you have a Dracula patient born before 1900?
    DECLARE
       date_check   DATE;
       dob_check    DATE;
       FUNCTION add_century(p_sdate IN VARCHAR2)
       RETURN VARCHAR2
       IS
       BEGIN
          RETURN CASE WHEN LENGTH(p_sdate )<10
                        THEN CASE WHEN TO_NUMBER(SUBSTR(p_sdate ,-2)) <= TO_NUMBER(TO_CHAR(SYSDATE,'YY'))
                                  THEN  SUBSTR(p_sdate ,1,6)||'20'||SUBSTR(p_sdate ,-2)
                                  ELSE  SUBSTR(p_sdate ,1,6)||'19'||SUBSTR(p_sdate ,-2)
                              END   
                        ELSE p_sdate
                    END;
       END;
    BEGIN
       BEGIN
          dob_check := TO_DATE (add_century(:p32_dob), 'MM/DD/YYYY');
          date_check := TO_DATE (add_century(:p32_di_ur_dt), 'MM/DD/YYYY');
          IF dob_check > date_check
          THEN
            RETURN 'Urine condition onset date cannot occur before birth date.';
          END IF;
       EXCEPTION
          WHEN OTHERS
          THEN
              RETURN 'Urine condition onset date not a valid date.';
       END;
    END;

  • Java io, sort by date question

    I have what I hope is a quick question - I am trying to open the oldest file in a given directory. The filenames are randomly generated, so the only criteria I have to search on is the create/mod date.
    Any ideas?
    thanks so much!

    Get all the files into an array. (You can do this with one line of code, have a look at the API documentation for java.io.File.)
    Scan the array and keep track of the entry that has the oldest last-modified date.

  • Fetch Rx Data questions

    The Fetch Rx Data vi contained in the Rx Streaming (Host) example doesn't seem to want to time out for me.  When a data underflow occurs, instead of timing out and giving up (per the documentation), it just locks up whatever loop it's in until the application is restarted.  Is there a way to modify this vi to prevent it from stalling my RX loop?
    If I drill down to the Fetch Rx Data (U32) vi, I can see that the Timeout method in the Invoke function is grayed out.  Is that significant? 
    Thanks.

    Thanks for the suggestion.  I see now that the timeout does actually do something.  Just not what I want it to do. 
    If I don't wire the Timeout input and then I stop the FIFO data, it stalls the loop while it's waiting for more  data.  If I feed it more data then it's happy and the loop iterates.  If I wait until it times out (10 seconds by default) the loop stays locked up for good.  If I stop the application I get no error, but if I stop just the loop it throws a -50400 at me.
    If I wire a 0 to the timeout it doesn't work at all because there are gaps in my FIFO data (the FPGA won't send any unless it's triggered).
    So I guess my question becomes this: does anyone know of a way to poll the DMA FIFO status so that I can execute Fetch RX Data conditionally?
    Thanks again.

  • The "write key" configurat​ion file vi use of "trim string" prior to writing the data can modify any string data written.

    I tried to use the config VIs to record some front-panel settings for later restoration, one of which could be a single space character (part of a string parsing system).
    I soon discovered that whenever I tried to save that single-space value to an INI file, only a null string was saved.
    After doing some digging I discovered that buried in the Write Key vi is a worker vi called Config Data Modify that uses Trim String on the string data before it is written to the file and that's what was eating my string character. I don't know whether this is a bug or a feature but there are at least three ways to fix it.
    1) Assuming you want to leave the library VIs alone, you can pre-process any stings sent to "write key" to replace all spaces with "\20" and then post-process all strings read using "read key" to replace all instances of \20 with spaces.
      and if you don't mind modifying the library VIs, either to save/use under a different name or to stick back into the library in a modified state (caution - can cause problems when you move code to another machine with an un-modified library) then...
    2) You can yank the trim-string out of the Config Data Modify vi and hope that it does not have any undesirable side effects with regards to the other routines that use Config Data Modify (so far I have not found any in my limited testing)
    or
    3)  You can modify the string pre-processing vi, Remove Unprintable Chars, to add the space character to the list of characters that get swapped out automatically.
    Note that both option #1 (as suggested above) and option #3 will produce an INI file data entry that looks like    key="\20Hello\20World\20"   while option #2 produces an entry that looks like   key=" Hello World "
    The attached PDF contains screenshots of all this.
    Attachments:
    Binder1.pdf ‏2507 KB

    Hi Warren,
    there's a 4th option:
    Simply set the "write raw string" input of the write key function to TRUE
    This option only appears when a string is wired to that function!
    Just re-checked:
    I think it's a limitation of the config file format. It's text based and (leading) spaces in the value are "overseen" as whitespaces. So your next option would be to use quotes around your string with spaces...
    Message Edited by GerdW on 05-02-2009 08:32 PM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

Maybe you are looking for

  • Panic debugger please help

    I was trying to update my mountain lion system when a message showed up with error ...on restart....the screen get freezed on the starting grey apple with lots of numbers and that panic debugger .....does anyone have any idea about that???!

  • Accessing MSACEES from SAP

    Hi, Can anyone send me description or code to create a connection to MSACCESS Database and Upload Data from there into my SAP Tables. I dont want to use EXCEL i only want to use Access only. Thanks, Usman Malik

  • Agentry startup log reports no ID and no location

    Hi all, following line comes from my agentry server startup log file: "ID: Agentry, Name: ???, Location: ???" agentry server works perfectly, I'd like to understand what does it mean, and where I could set missing (reported) informations Many thanks

  • FM or BAPI for BP transaction

    Hi All, Is there any BAPI or FM to create Business partner? BAPI_BUPA_CREATE_FROM_DATA and BAPI_BUSINESS_PARTNER_CREATE are not usefull for my scenario as I need to populate company code data and sales area data . Thanx. Rekha.

  • Can not copy and paste

    I have the new retina display mac book pro. I can not copy and paste anymore, using the shortcutes or teh two finger click to right click. I also can not drag and drop things. It is really frustrating not being able to copy text, please help! It happ