Comparisons of Duration, Date and Time Values

Hello,
Is there way to simulate support for XPath 2.0 date/time comparison functions?
(can I create a module to replace currently available XPath functions with my
own?)
Are there plans to fully support those functions?
For example: func-date-less-than
http://www.w3.org/TR/xquery-operators/#func-date-less-than
... snip ...
( time-less-than( time("12:00:00"), time("23:00:00+06:00") ) )
... snip ...
Regards,
Benjamin Shrom.

Just use lt on the dates, dateTime and time elements
<db>
     for $PB_BB.CUSTOMER_1 in document("PB-BB")/db/CUSTOMER
     where ($PB_BB.CUSTOMER_1/CUSTOMER_SINCE lt $#customer_since_cutoff of type
xs:date)
     return
     <CUSTOMER>
          <CUSTOMER_ID>{ xf:data($PB_BB.CUSTOMER_1/CUSTOMER_ID) }</CUSTOMER_ID>
     </CUSTOMER>
</db>
- Mike
"Benjamin Shrom" <[email protected]> wrote:
>
Hello,
Is there way to simulate support for XPath 2.0 date/time comparison functions?
(can I create a module to replace currently available XPath functions
with my
own?)
Are there plans to fully support those functions?
For example: func-date-less-than
http://www.w3.org/TR/xquery-operators/#func-date-less-than
... snip ...
( time-less-than( time("12:00:00"), time("23:00:00+06:00") ) )
... snip ...
Regards,
Benjamin Shrom.

Similar Messages

  • Current date and time in narrative. html?

    Hello,
    I would like to include current time and date in the narrative of a report. The purpose of this is that when end-users export the report a time and date of export is inlcuded in the export so that I know when specific reports where exported.
    I now have a workaround with added hidden date and time columns and showing only first rows of these hidden columns. This is quite a lot of work since I have to update about 75 reports with this date and time values.
    Does any of you know how to include currentdat and time in the narrative with a html code?
    Or are there other ways to achieve what I am looking for?
    Thanks a lot

    Hi,
    We had similar kind of requirement.
    We have created a repository variable "CurrentDateTime" and added this in each and every report in the narrative view as below.
    Steps:
    1.Leave the existing Table view or chart view as it is.
    2.Add one narrative to the existing report.
    3.Modify the narrative view and paste the below logic in that.
    Current Date: @{biServer.variables.CurrentDateTime}
    Hopes this helps.
    Thanks,
    Pramod

  • Inserting Date AND Time using DBMS_XMLStore.insertXML

    Hello,
    I'm using a c# app to create an xml file to be passed to a stored procedure. The store procedure then uses DBMS_XMLStore.insertXML to insert the record in the xml file into the database.
    There is a field in the Oracle table called "ENTER_DATE". I've been putting a date into the xml file for this field (ie. "10-mar-2010") and this has worked fine. However, I've now been asked to include the time with the date.
    Is it possible to somehow put a date AND time value in the xml tag value so that DBMS_XMLStore.insertXML will properly insert it into the Oracle table? Everything I try returns a date picture format error.
    Thanks

    SQL> create table dept2
    as
       select d.*, sysdate enter_date
         from dept d
        where 1 = 2
    Table created.
    SQL> select * from dept2
    no rows selected.
    SQL> alter session set nls_date_format='dd.mm.yyyy hh24:mi:ss'
    Session altered.
    SQL> declare
       ctx   dbms_xmlstore.ctxtype := dbms_xmlstore.newcontext ('dept2');
       doc  xmltype
          := xmltype('<START>
                   <ROW>
                     <DEPTNO>10</DEPTNO>
                     <DNAME>ACCOUNTING</DNAME>
                     <LOC>NEW YORK</LOC>
                     <ENTER_DATE>10.10.2010 23:11:16</ENTER_DATE>
                   </ROW>
                         </START>');
       ret   int;
    begin
       ret := dbms_xmlstore.insertxml (ctx, doc);
       dbms_xmlstore.closecontext (ctx);
    end;
    PL/SQL procedure successfully completed.
    SQL> select * from dept2
        DEPTNO DNAME          LOC           ENTER_DATE          
            10 ACCOUNTING     NEW YORK      10.10.2010 23:11:16 
    1 row selected.

  • How to get the date and Time?

    Hi,
    I am using Jdev 11.1.2.0.
    I had one database table. In that table one variable as bgnDtm and the datatype as oracle.jbo.domain.Timestamp. In my Impl class I declare one variable as beginDate(DateType as oracle.jbo.domain.Date).
    Now I am using the conversion as beginDate=(Date) SampleVO.getAttribute("bgnDtm ");.If I using this scenario I got the Type cast error. so how can I separate Date and Time value.
    So how to do. Please provide some suggestions.
    Regards,
    Ragu.

    you can get the time value either from oracle.jbo.domain.Timestamp or from oracle.jbo.domain.Date
    oracle.jbo.domain.Timestamp timeStampDate = (oracle.jbo.domain.Timestamp) SampleVO.getAttribute("bgnDtm");
    Time time;
            try {
                time = timeStampDate.timeValue();
                System.out.println(time);
            } catch (SQLException e) {
                e.printStackTrace();
            java.sql.Date sqlDate=timeStampDate.dateValue();
                oracle.jbo.domain.Date jboDate=new oracle.jbo.domain.Date(sqlDate);
            Time timeValue = jboDate.timeValue();
            System.out.println(timeValue);Edited by: M.Jabr on Dec 23, 2011 1:55 PM

  • Date and time formatting not responding

    I'm trying to total a column based on a date or date window.  My formula looks like this.
    SUMIF(Date,B1,'$')
    I have 2 tables.  The table with the formula references the other table, and compares Date in table 1 to B1 in table 2.  B1 is a date I enter to see a specific total for that day only.  It only works if all the times of the date window are 12:00:00 AM.  , and the B1 times are the same ..... Even though times are unimportant to the totals I need, and both are formatted to "none" and do. It show.
    So, how do I total a specific date with various times, but all the same date?  I have a sample file if it will make more sense to see it.
    Not that it matters, but I am doing this on an iPad, but the formula still did not respond correctly on Mavericks either.  Unless I set all times equal to B1.
    Sorry if I didn't explain very well.  I'm new at this formula thing. 
    Thanks
    Jeff

    Hi Jeff,
    The entered date in B1 will have it's time part set to 00:00:00 (midnight, at the beginning of that date). To use SUMIF to filter the date and time values in Table 1, you would need to write a single condition that would accept all date and time values falling on the date in BI, and reject all date and time values falling on days before or after that date.
    SUMIFS allows you to specify multiple conditions, all of which must be met to acept a test value and add its associated sum value to the total. Here's an example:
    The formula in B1 of Table 2 is shown below:
    B2: =SUMIFS(Table 1 :: B,Table 1 :: $A,">="&B1,Table 1 :: $A,"<"&(B1+1))
    Syntax: =SUMIFS(sum-values,test-values,condition,test-values,ˆcondition)
    Regards,
    Barry

  • Date and Time since 1900 Jan 1st

    I have a cell with the number of days since Jan 1, 1900. How would I display or convert this to a date and time.
    3599.4495424 to any date and time format.
    Thanks

    Simple addition. Format result (a Date and Time value) as you wish, using the Cell format Inspector.
    Regards,
    Barry

  • Changing date and time  format

    Hi all,
      I got date and time value as  20051219 and 235959 resp.
    I want to convert it into standard format that is 19.12.2005 and 23:59:59.
    How should i dothis,or which function module should i used.
    Thanks and Regards,
    Sugeet.

    Using the WRITE statement
      data: gd_date(10).  "field to store output date
    * Converts date from 20020901 to 01.09.2002
      write sy-datum to gd_date dd/mm/yyyy.
    * Converts date from 20020901 to 01.09.02
      write sy-datum to gd_date dd/mm/yy.
    DATA time TYPE t VALUE '154633'.
    WRITE: time,
      /(8) time USING EDIT MASK '__:__:__'.
    Using Function modules
      data: gd_date(8).  "field to store output date
    * Converts date from 20010901 to 01SEP2001
      gd_date   = sy-datum.
      CALL FUNCTION 'CONVERSION_EXIT_IDATE_OUTPUT'
        EXPORTING
          input         = gd_date
        IMPORTING
          OUTPUT        = gd_date.
    Hope this helps.
    Reward points and close the thread if ur problem got solved or get back with queries.

  • Parsing date and time info

    Hello,
    Could you please help me find the date and time out of this output :-
    1094130971507 ?
    The following code resulted in this output,
    Date now = new Date();
    DateFormat fmt = DateFormat.getDateTimeInstance(DateFormat.SHORT,
    DateFormat.MEDIUM, Locale.US);
    String timeFrame = fmt.format(now) + " " + frame; // frame = some data
    try {
    File histFile = new File("logfile" + (new Date()).getTime() + ".txt");
    FileOutputStream histStream = new FileOutputStream(histFile);
    printWriter = new PrintWriter(histStream, true);
    catch(Exception e) {
    System.out.println(e);
    printWriter.println("OUT " + timeFrame);
    I tried to tokenize the logfile and read the date and time value by using the StreamTokenizer and I have the data as 1094130971507 in the double st.nval. I have to extract the time information alone from this double.
    Does some have a smart idea ?.
    Thanks in advance,
    Domnic

    Could you please help me find the date and time out
    of this output :-
    1094130971507 ?
    printWriter.println("OUT " + timeFrame);You are claiming that the first was the result of the second?
    Not with the Sun VM it doesn't.
    The following code...
    DateFormat fmt = DateFormat.getDateTimeInstance(DateFormat.SHORT,
    DateFormat.MEDIUM, Locale.US);
    String timeFrame = fmt.format(now) ...
    Is going to produce the following output....
    1/27/05 1:28:25 PM

  • Why are date and time strings lost when indexing an array in a for loop

    Hi, 
    I have an application where i'm reformatting data from a spreadsheet for graphical display on a LabVIEW dashboard.
    the original spreadsheet has date and time values in separate columns, and i'm merging them and converting to a timestamp value.  But something's not working.  Does anyone know why the string value is lost when the array indexes into this for loop?
    Attachments:
    failed array index.png ‏142 KB

    Can you attach your VI with some typical values? (e.g. create in indicator on the 2D array, run your VI, then turn the indicator (now containing data) into a diagram constant). Place the FOR loop related code and that diagram constant into a new VI and attach it here.
    How many times does the FOR loop run? Could it be that the last element of each 1D array is an empty string? (unless you put a wait inside the FOR loop, you'll never see the other elements in the probe)
    LabVIEW Champion . Do more with less code and in less time .

  • Date and Time comparisons...

    Hi! and regards to all.... I´m trying to get the interval from a table depending on current date and time (sysdate), but i´m having problems when comparing date where first one is greater than second one...
    My table is defined and populated as...
    HRA_ID HRA_INTERV HRA_INICIO HRA_FIN
    1 15 01/01/2008 08:00:00 a.m. 01/12/2020 10:00:00 p.m.
    2 30 01/01/2008 10:01:00 p.m. 01/12/2020 07:59:00 a.m.
    Whend doing comparison between 8:00am to 10:00pm no problem is found and the data 15 is returned... but when comparing in the second interval (10:01pm to 7:59am next day) problems are come.. I supose is because of different days are considered in my sql statement... nevertheless i would like to receive comments...
    My sql statement is:
    SELECT HRA_INVERV
    FROM UBI_HORARIOS A
    WHERE TO_DATE(TO_CHAR(SYSDATE,'HH24:MI:SS'),'HH24:MI:SS')
    BETWEEN (TO_DATE(TO_CHAR(A.HRA_INICIO,'HH24:MI:SS'),'HH24:MI:SS'))
    AND
         (TO_DATE(TO_CHAR(A.HRA_FIN,'HH24:MI:SS'),'HH24:MI:SS'))
    Your suggestions are welcome...

    Thanks Justin!!, and EXACTLY!!!... That was the first error I found when my supervisors gave me the database ralational diagram... But in this case fields with data type TIME are not allowed.. So, what I´m trying to to is trim the date parte of the field (01/01/2008, etc,etc) and JUST USE TIME INTERVALS... That´s why I´m using to_char and to_date... in order to ELIMINATE DATE PARTS AND USE JUST THEIR TIME PERIODS... But being honest.. i don´t know if there´s another function could help...

  • Get-Hotfix InstalledOn property not returning hotfix installed Date and Time on Windows Server 2008 SP2 but works on Windows Server 2008 R2 SP1

    Hi,
          I am working on a validation script to get the list of hotfixes installed on Domain Controllers every month as part of our monthly DC patching process. I have been successful in getting these details for DC's with (Windows Server 2008
    R2 SP1, Powershell v2.0) using the below command. 
    Get-HotFix -cn $computer | Select-Object PSComputerName,HotFixID,Description,InstalledBy,InstalledOn | where InstalledOn -ge (Get-Date -Day 1 -Format d) | FT -AutoSize
    I execute the above from a jump box with powershell v4.0 (Server 2008 R2)
    However, when I try the same command from the jump box to query DC's with (Server 2008 SP2, powershell v2.0). It doesn't return the InstalledOn date and time. It was giving error for the InstalledOn property and hence I renamed it to $_.InstalledOn. Now
    I don't get error but still no details displayed for InstalledOn property.
    I tried using the below, as could see on few forums that this might resolve the issue. I also tried removing the "where" part but still no installation date returned. 
    Get-HotFix -cn $computer | Select-Object HotFixID, Description, InstalledBy, @{l="InstalledOn";e={[DateTime]::Parse($_.psbase.properties["installedon"].value,$([System.Globalization.CultureInfo]::GetCultureInfo("en-US")))}}
    | where {$_.InstalledOn -ge (Get-Date -Day 1 -Format d)} | FT -AutoSize
    Have tried this locally on the 2008 SP2 DC but still not working. Please advise what is going wrong? 
    Note: If I execute the below command locally on the 2008 SP2 DC, I am getting the InstalledOn output. However, when executed from the jump box with powershell v4.0 (Server 2008 R2) to query
    the same 2008 SP2 DC, it just gives the prompt again without any error or output. This behavior is consistent for other 2008 SP2 DC's in the environment.
    Get-HotFix -cn $computer | Select-Object HotfixID,Description,InstalledBy,InstalledOn | where {$_.InstalledOn -ge (Get-Date -Day 1 -Format d)} | FT -AutoSize

    Hi jrv, I have already tried the Win32_QuickFixEngineering option, which doesn't work either. Apologies for not mentioning the workarounds that I have already tried.
    Get-Hotfix seems to be just a wrapper for Win32_QuickFixEngineering as per the below article. (http://technet.microsoft.com/en-us/library/hh849836.aspx)
    I have seen a mention of using the WU ActiveX control on few forums, but was too lazy to read it through.
    After rigorous testing, it makes me realize that somewhere the Get-Hotfix dates formatting\comparison isn't working. 

  • Show active current date and time in a Form continuously

    Hi,
    I am use Oracle Form 10.1.2 in Windows 2000.
    Can we show an active current date and time in a Form continuously?
    Perhaps in the main menu form.
    So the user can see the moving time, instantly when the time change (withour pushing F5 for refreshing the form)
    23-Sep-2006 06:00
    -- one minute later will show
    23-Sep-2006 06:01
    -- one minute later will show
    23-Sep-2006 06:02
    -- and so on
    Any help is appreciated.
    Many thanks,
    Buntoro

    Here is a quick, untested suggestion that sketches out one way of approaching this.
    If you only require updates every 60 seconds, you can use the TIMER built-in to create a repeating timer with a sixty-second delay. Each time the timer expires, update a text item to reflect the current time (obtained by selecting SYSDATE from DUAL on the database.)
    If the time is to be updated precisely when the minute changes, use two timers -- the same one described above, and a one-shot. Before you create either timer, run the following query:
       SELECT 60-TO_NUMBER(TO_CHAR(SYSDATE, 'ss')) FROM DUALThis will give the number of seconds remaining until the minute changes. Use this value to set the duration of the one-shot timer. When it expires, create the repeating sixty-second timer.
    There is a good possibility that this method will not be terribly precise, depending on factors like server resources, user load and network distance. A more network-friendly approach would be to use a JavaBean that relies on the PC's system timer to track the passage of time, and calculates server time based on the observed time difference between PC & server.
    Hope this helps,
    Eric Adamson
    Lansing, Michigan

  • Question about Date and Time formulas

    Hi, I am new to Numbers, former Excel user. I have been able to use Numbers fine until I got stuck in trying to calculate paces. I am a triathlon coach and use pace for running. In Excel I could type pace in as a product of time. So if I want it to show 7:45, I would use date and time and punch in 12:07:45 and it would show up as 7:45. Then in the cells below, I could take that 7:45 cell and divide "/" by .8, etc and it would produce another pace (7:34 for example).
    When I try the same thing in Numbers, it will produce the 7:45 by punching in 12:07:45, but it will not let me divide of multiply. It gives me the triangle and says "the operator / expects a number, but found 7:45. And will not divide or multiply. Anyone know a way around this?

    kource,
    Go to the Inspector and set the cell format to "Duration", with the units set to "Minutes".
    Now, the cell value will appear "7:45", and when you set an adjacent cell and set it to .8 of this one, its value will be "6:12" (that is, 7:45 = 465 seconds; .8 of 465 is 372 seconds, or 6:12).
    This is what you're looking for, correct?
    Cheers,
    Larry

  • Null Date and Time Problem

    I created my entity classes from a database by using netbeans 6.0 and I'm using H2 as a database. I've the following table in my database.
    CREATE CACHED TABLE OPEN_TABLE ( ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) NOT NULL PRIMARY KEY, TABLE_ID INTEGER, WAITER_ID INTEGER, OPEN_HOUR TIME DEFAULT CURRENT_TIME, OPEN_DATE DATE DEFAULT CURRENT_DATE );
    and here is the entity class netbeans created for me.
    import java.io.Serializable; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; /** * * @author Yupp */ @Entity @Table(name = "OPEN_TABLE") @NamedQueries({@NamedQuery(name = "OpenTable.findById", query = "SELECT o FROM OpenTable o WHERE o.id = :id"), @NamedQuery(name = "OpenTable.findByTableId", query = "SELECT o FROM OpenTable o WHERE o.tableId = :tableId"), @NamedQuery(name = "OpenTable.findByWaiterId", query = "SELECT o FROM OpenTable o WHERE o.waiterId = :waiterId"), @NamedQuery(name = "OpenTable.findByOpenHour", query = "SELECT o FROM OpenTable o WHERE o.openHour = :openHour"), @NamedQuery(name = "OpenTable.findByOpenDate", query = "SELECT o FROM OpenTable o WHERE o.openDate = :openDate")}) public class OpenTable implements Serializable {     private static final long serialVersionUID = 1L;     @Id     @Column(name = "ID", nullable = false)     private Integer id;     @Column(name = "TABLE_ID")     private Integer tableId;     @Column(name = "WAITER_ID")     private Integer waiterId;     @Column(name = "OPEN_HOUR")     @Temporal(TemporalType.TIME)     private Date openHour;     @Column(name = "OPEN_DATE")     @Temporal(TemporalType.DATE)     private Date openDate;     public OpenTable() {     }     public OpenTable(Integer id) {         this.id = id;     }     public OpenTable(Integer id, Date openHour, Date openDate) {         this.id = id;         this.openHour = openHour;         this.openDate = openDate;     }     public Integer getId() {         return id;     }     public void setId(Integer id) {         this.id = id;     }     public Integer getTableId() {         return tableId;     }     public void setTableId(Integer tableId) {         this.tableId = tableId;     }     public Integer getWaiterId() {         return waiterId;     }     public void setWaiterId(Integer waiterId) {         this.waiterId = waiterId;     }     public Date getOpenHour() {         return openHour;     }     public void setOpenHour(Date openHour) {         this.openHour = openHour;     }     public Date getOpenDate() {         return openDate;     }     public void setOpenDate(Date openDate) {         this.openDate = openDate;     }     @Override     public int hashCode() {         int hash = 0;         hash += (id != null ? id.hashCode() : 0);         return hash;     }     @Override     public boolean equals(Object object) {         // TODO: Warning - this method won't work in the case the id fields are not set         if (!(object instanceof OpenTable)) {             return false;         }         OpenTable other = (OpenTable) object;         if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {             return false;         }         return true;     }     @Override     public String toString() {         return "OpenTable[id=" + id + "]";     } }
    The problem is when I try to insert a new OpenTable to the database, Open_Date and Open_Hour columns stay as null. I want them to get the automatic CURRENT_DATE and CURRENT_TIME values. I can't see where the problem is because I used CURRENT_DATE and CURRENT_TIME words when I created the table. I don't have any problems when I use standart SQL statements to insert a new row. I just use INSERT INTO OPEN_TABLE(TABLE_ID, WAITER_ID) VALUES(2,3) and get current date and hour values automatically but JPA doesn't do that for me. What should I do to solve the problem?

    Those database defaults are only applied when you use an INSERT statement that specifies a list of columns excluding the ones with defaults. Presumably your persistence code always sets all columns when it does an INSERT, so the defaults won't apply. You'll have to find the way to set the defaults in the persistence layer, not in the database.

  • Work Status Report Date and Time Setting

    Hi all
    We are running BPC10 on servers configured with Central European Time which is currently 2 hours ahead of GMT allowing for Daylight Savings Time.
    From what i can see in BPC10 date and times are now stored in GMT (Zulu time) in the Audit activity tables so when a user updates the work status at say 11:00AM local CET time then a value of 09:00AM GMT is stored in the Audit Activity Header table.
    We have a report in excel that uses the EVLCK formula and will return the correct value of 11:00 am however if we run the Work Status Audit report on the Planning and Consolidation home page with user preferences set to Central European Time +1 then the time is displayed as 10:00am suggesting that daylight savings time is not accounted for. We need to set the time to Eastern European time +2 hours to display the correct figure.
    Can anyone explain why this happens? Has DST been overlooked?
    Rgds
    Alan

    Hi Alan,
    probably it's a bug, I think it's better you open an OSS message to SAP.
    Regards
         Roberto

Maybe you are looking for

  • JSP Dynamic content problem

    In my jsp page I have 2 combo boxes--data of 2nd comboBox is dependent on the 1st. The data for both is previously obtained from a database. How to do this ? I'm using MVC 1 archi.

  • I work for IKEA they are Micro soft. I used to be able to get to the site now I can't, what happened.

    I have an apple desktop, IKEA does not support mac, so I used firefox for awhile, now I can't access the site. What happened? Thank you

  • Report mcsi

    Hello all For example  : the sales order is created with bill of materials in the sales order the net value is 1000 and for generating the report we r using the mcsi  t-code but in the mcsi report system is  showing 800 rs  the value difference is th

  • Available Size in Application Path.

    Hello, I have developed an iPhone application. The application build size is 1.3MB. My application working with lot of mp3 and m4v files. I downloaded all files from server and uploaded into application path [Document]. The audio and video file nearl

  • Dynamic invocation in Axis

    I've deployed two services, one using framework Axis, one using framework Muse(a web service apache project). I want to make a dynamic invocation from Axis to use an operation of Muse, I add the code in the impl document of Axis. Is it possible to do