Using Date in expressions

Having problem with using DAte in Expressions. Does anybody know if toplink API provides any method on Expressions to do date comparison. When I try to use equal, it tries to convert the date to a String. Is ther eany work arounf for this.
Any help would be appreciated

Check the Javadoc for Expression, search for "Date". There are lots of functions available including various date math functions.
- Don

Similar Messages

  • Displaying diff dates using PL/SQL expression for 'display only' item ?

    Hi ,
    I am having a display only item -- :P2_FROM_Date . If its Thu,Fri,Sat or Sun I want to set the date as the last Monday's date . If its Mon,Tue or Wed then it should be the present Monday's date .
    E.g: Today is Friday and the last Monday was on 18th .
    So for yesterday , today,tomorrow and Sunday , the date should be displayed as 18-JUN-2012.
    From the coming Monday to Wednesday , the date should of be the coming Monday i.e , 24-JUN-2012
    I tried it doing under 'Source ' of item using PL/SQL expression and PL/SQL function body. Not working
    Can someone help ?
    Thanks & Regards
    Umer

    Nice1 wrote:
    declare
    lv_date number;
    begin
    select to_char(sysdate,'D') into lv_date from dual;
    if lv_date=2 then
    :P2_FROM_DATE := to_char(sysdate-1);
    end if;
    end;I tried this under " PL/SQL function body " in "Source " tab of the item P2_FROM_DATE
    When I run this , nothing is displayed corresponding to the item P2_FROM_DATEExactly as expected. This code will only set a value for <tt>P2_FROM_DATE</tt> when run on Mondays in territories where the first day of the week is Sunday, and when run on Tuesdays where Monday is the first day of of the week:
    SQL> var P2_FROM_DATE varchar2(30)
    SQL> alter session set nls_date_format='Dy DD-MON-YYYY';
    Session altered.
    SQL> select sysdate from dual
    SYSDATE
    Mon 25-JUN-2012
    SQL> alter session set nls_territory='AMERICA';
    Session altered.
    SQL> declare
      2  lv_date number;
      3  begin
      4  select to_char(sysdate,'D') into lv_date from dual;
      5  if lv_date=2 then
      6  :P2_FROM_DATE := to_char(sysdate-1);
      7  end if;
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    SQL> print p2_from_date
    P2_FROM_DATE
    Sun 24-JUN-2012
    SQL> alter session set nls_territory='UNITED KINGDOM';
    Session altered.
    SQL> exec :p2_from_date := null
    SQL> declare
      2  lv_date number;
      3  begin
      4  select to_char(sysdate,'D') into lv_date from dual;
      5  if lv_date=2 then
      6  :P2_FROM_DATE := to_char(sysdate-1);
      7  end if;
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    SQL> print p2_from_date
    P2_FROM_DATE
    SQL>Hence the questions about language above.
    >
    I am having a display only item -- :P2_FROM_Date . If its Thu,Fri,Sat or Sun I want to set the date as the last Monday's date . If its Mon,Tue or Wed then it should be the present Monday's date .
    E.g: Today is Friday and the last Monday was on 18th .
    So for yesterday , today,tomorrow and Sunday , the date should be displayed as 18-JUN-2012.
    From the coming Monday to Wednesday , the date should of be the coming Monday i.e , 24-JUN-2012
    >
    The coming Monday is 25-JUN-2012.
    Aren't these rules equivalent to "Monday this week, where Monday is the first day of the week"? In which case the PL/SQL Expression you require is:
    trunc(sysdate, 'iw')For example:
    SQL> with t as (
      2    select date '2012-06-21' + level d from dual connect by level <= 17)
      3  select
      4            d
      5          , trunc(d, 'iw')  monday
      6  from
      7            t;
    D               MONDAY
    Fri 22-JUN-2012 Mon 18-JUN-2012
    Sat 23-JUN-2012 Mon 18-JUN-2012
    Sun 24-JUN-2012 Mon 18-JUN-2012
    Mon 25-JUN-2012 Mon 25-JUN-2012
    Tue 26-JUN-2012 Mon 25-JUN-2012
    Wed 27-JUN-2012 Mon 25-JUN-2012
    Thu 28-JUN-2012 Mon 25-JUN-2012
    Fri 29-JUN-2012 Mon 25-JUN-2012
    Sat 30-JUN-2012 Mon 25-JUN-2012
    Sun 01-JUL-2012 Mon 25-JUN-2012
    Mon 02-JUL-2012 Mon 02-JUL-2012
    Tue 03-JUL-2012 Mon 02-JUL-2012
    Wed 04-JUL-2012 Mon 02-JUL-2012
    Thu 05-JUL-2012 Mon 02-JUL-2012
    Fri 06-JUL-2012 Mon 02-JUL-2012
    Sat 07-JUL-2012 Mon 02-JUL-2012
    Sun 08-JUL-2012 Mon 02-JUL-2012
    17 rows selected.
    SQL> alter session set nls_territory='AMERICA';
    Session altered.
    SQL> alter session set nls_date_format='Dy DD-MON-YYYY';
    Session altered.
    SQL> with t as (
      2    select date '2012-06-21' + level d from dual connect by level &lt;= 17)
      3  select
      4            d
      5          , trunc(d, 'iw')  monday
      6  from
      7            t;
    D               MONDAY
    Fri 22-JUN-2012 Mon 18-JUN-2012
    Sat 23-JUN-2012 Mon 18-JUN-2012
    Sun 24-JUN-2012 Mon 18-JUN-2012
    Mon 25-JUN-2012 Mon 25-JUN-2012
    Tue 26-JUN-2012 Mon 25-JUN-2012
    Wed 27-JUN-2012 Mon 25-JUN-2012
    Thu 28-JUN-2012 Mon 25-JUN-2012
    Fri 29-JUN-2012 Mon 25-JUN-2012
    Sat 30-JUN-2012 Mon 25-JUN-2012
    Sun 01-JUL-2012 Mon 25-JUN-2012
    Mon 02-JUL-2012 Mon 02-JUL-2012
    Tue 03-JUL-2012 Mon 02-JUL-2012
    Wed 04-JUL-2012 Mon 02-JUL-2012
    Thu 05-JUL-2012 Mon 02-JUL-2012
    Fri 06-JUL-2012 Mon 02-JUL-2012
    Sat 07-JUL-2012 Mon 02-JUL-2012
    Sun 08-JUL-2012 Mon 02-JUL-2012
    17 rows selected.Also note that using the item source properties will only set the <tt>P2_FROM_DATE</tt> in the rendered page, not in session state.

  • How to use TRUNC function with dates in Expression Builder in OBIEE.

    Hi There,
    How to use TRUNC function with dates in Expression Builder in OBIEE.
    TRUNC (SYSDATE, 'MM') returns '07/01/2010' where sysdate is '07/15/2010' in SQL. I need to use the same thing in expression builder in BMM layer logical column.
    Thanks in advance

    use this instead:
    TIMESTAMPADD(SQL_TSI_DAY, ( DAYOFMONTH(CURRENT_DATE) * -1) + 1, CURRENT_DATE)

  • [svn:fx-trunk] 9349: * Added support for using getStyle() in Mxml data binding expressions.

    Revision: 9349
    Author:   [email protected]
    Date:     2009-08-17 11:32:37 -0700 (Mon, 17 Aug 2009)
    Log Message:
    Added support for using getStyle() in Mxml data binding expressions.
      In addition to the existing "function return watcher" data binding
      functionality, we register to listen for style related change events
      when we see a function marked with [Bindable(style="true")].
      UIComponent's and TextGraphicElement's styleChanged() will now
      dispatch events for "getStyle()" FunctionReturnWatchers to handle.
      When null or "styleName" is passed into styleChanged(), we dispatch
      an "allStylesChanged" event.
    QE notes: mxunit test to follow
    Doc notes:
    Bugs: SDK-20394
    Reviewer: Glenn, Pete F, Peter D
    Tests run: checkintests, mxunit databinding
    Is noteworthy for integration: only if you want to start using it.
    Code-level description of changes:
      modules/compiler/src/java/flex2/compiler/as3/binding/DataBindingExtension.java
        Modified generateWatcher() to do the AST equivalent of the
        WatcherSetupUtil.vm change.
      modules/compiler/src/java/flex2/compiler/as3/binding/FunctionReturnWatcher.java
        Removed unused isNew variable and added isStyleWatcher variable.
        Modified shouldWriteSelf() to return true if isStyleWatcher is true.
      modules/compiler/src/java/flex2/compiler/as3/binding/WatcherSetupUtil.vm
        Modified writeFunctionReturnWatcher macro to add a true arg to the
        FunctionReturnWatcher constructor call when isStyleWatcher() is
        true.
      modules/compiler/src/java/flex2/compiler/as3/binding/BindableFirstPassEvaluator.java
        Modified evaluate(Context, MetaDataNode) to skip reporting an
        error for no events when style is true.
      modules/compiler/src/java/flex2/compiler/as3/binding/DataBindingFirstPassEvaluator.java
        Replaced insideCallExpression boolean with callExpressionStack
        Stack.  The "!insideCallExpression" checks were replaced with
        callExpressionStack.isEmpty().
        Modified addBindables() to handle [Bindable(style="true")].
        Made argumentListStack and resetSet more strongly typed.
      frameworks/projects/framework/src/mx/core/UIComponent.as
        Modified styleChanged() to dispatch a "Changed" and "allStylesChanged" from the previous
        parent and add listeners to the new parent when isStyle is true.
        Modified eventHandler to notifyListeners() when isStyle is true.
      frameworks/projects/spark/src/spark/primitives/supportClasses/TextGraphicElement.as
        Similar changes to UIComponent.
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-20394
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/mx/binding/FunctionReturnWatcher.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/TextGraphicE lement.as
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/BindableFirstPassEval uator.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/DataBindingExtension. java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/DataBindingFirstPassE valuator.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/FunctionReturnWatcher .java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/WatcherSetupUtil.vm

  • If using airport express on cell network and using only the airplay connected to stereo does it use data allowance if playing music on iOS device " not streaming from net"?

    If using airport express to play iTunes music with airplay feature with cell network (hotspot on cell phone) does it use data allowance?

    No

  • How to install and use sql server express 2014 with tools

    I am a student and have an assignment that requires I use either mysql or sql server, so I chose to download and install sql server express 2014 with tools, but after installation was complete all I can see is sql server 2014 import and export data (64-bit)
    and I have no clue what to do wiith it...I had used sql server 2008 a couple  of  years ago and it was easy, but this is very complicated, I have been trying to get this done for 2 days now, so someone please help me and tell me what I am doing wrong.

    Hi,
    It seems you did not installed complete software. Make sure you have downloaded below from
    SQL Server Express Download link
    Express with Advanced Services (SQLEXPRADV) when you click on Get started button on page displayed by clicking on above link. This download includes Sql Server Management Studio as well.
    Before moving I would Like you to first read
    Hardware and Software requirements
    Please refer 
    how to install SQL server 2014 express
    Above Link is for Enterprise edition  but you can use it for express as well. When you reach page feature selection please select all features to install.
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it.
    My TechNet Wiki Articles

  • Using the "IN" expression in SQL statement

    Hi,
    I have an array with multiple values stored in it. I would like to use these values in the filter expression of another query using the "IN" clause (data is coming from a sql dataabse). Is there a way to achieve this, I did not see an option in the std query template for using the "IN" expression.
    Thanks.

    Or, to save Params, pass in a comma separated list of match values:
    select * from mytable where mycolumn in ([Param.1])
    And if you are getting the comma separated list from say an iBrowser, here are two quick utilities to build a comma separated list of the iBrowser values or iBrowser Datalink values:
    // returns comma separated list of DATALINK values from iBrowser.
    // if none selected, returns list of all values
    function getCSLDatalinkValues(myApplet) {
         var selValues = "";
         var selCount = myApplet.getBrowserObject().getSelectedItemCount();
         if(selCount) {
              for(var i=1; i<= selCount; i++) {
                   selValues += myApplet.getBrowserObject().getSelectedDatalinkValueAt(i) + "','";
         } else {
              for(var i=1; i<= myApplet.getBrowserObject().getItemCount(); i++) {
                   selValues+= myApplet.getBrowserObject().getDatalinkValueAt(i) + "','";
         // remove trailing ","
         selValues = selValues.substring(0,selValues.length-2);
         // insert begin "'"
         selValues = "'" + selValues;
         return selValues;     
    // returns comma separated list of values from iBrowser.
    // if none selected, returns list of all values
    function getCSLValues(myApplet) {
         var selValues = "";
         var selCount = myApplet.getBrowserObject().getSelectedItemCount();
         if(selCount) {
              for(var i=1; i<= selCount; i++) {
                   selValues += myApplet.getBrowserObject().getSelectedItemAt(i) + ",";
         } else {
              for(var i=1; i<= myApplet.getBrowserObject().getItemCount(); i++) {
                   selValues += myApplet.getBrowserObject().getItemAt(i) + ",";
         // remove trailing ","
         selValues = selValues.substring(0,selValues.length-1);
         return selValues;     

  • Using Oracle Database Express Edition in development environment

    Hi All,
    I have doubt regarding the usage Oracle Database Express Edition in Development environment. I am not sure weather I can ask a non technical question here or not. Pleas forgive me if I have done any thing wrong.
    I am working in an IT company where we take up projects outsourced by our clients. As part of our current project we are making some modification to a web application used by an institution. Our client is using Oracle Data Base standard edition. Due to budgetary constraints of our Company we can not set up a Oracle standard edition data base in our development environment.
    So would it be illegal if we use  Oracle Database Express Edition in our development environment?  We can guarantee that  only our internal development team which comprise a maximum of 10 people will have access to this development database and this development data base will never be opened to our Client for their business purpose(Who have their own Oracle standard edition in their environment). As part of the project we delver only table DDL script and stored procedure to our client and they put it in their environment.The sole purpose of a internal Express database will be development only.
    Could some one please tell me if it would be violation of license agreement if we install Oracle Database Express Edition in our development environment.

    Hi Paul,
    Actually I have already gone through the Oracle Technology Network Developer License Terms for Oracle Database 11g Express Edition . But was not quiet clear about the content. It says in the license terms that "We grant you a nonexclusive, nontransferable limited license to use the programs for: (a) purposes of developing, prototyping and running your applications for your own internal data processing operations". Does the term "your application" includes an application we are developing for another company. Since the Express database  is installed in the development environment only and is not opened to any one else not even for Our client it definitely falls under the term "internal data processing operations" right?

  • How do I automate a large catalog with several unique sections using Data Merge and Microsoft Excel?

    My boss would like me to use data merge to create a catalog with 300+ pages and unique data fields on almost every page. It is an informational catalog that would contain pictures and several unique fitment and specification fields for each product that we sell and manufacture on each page. For years the catalog was made and modified manually in quark express. Is it possible to use data merge to recreate such a complex document? Does anyone have any useful reccomendations or links for tackling this project? I really appreciate any advice or help.
    Thank You,
    Kevin
    Message was edited by: kpalombi

    Online video
    http://tv.adobe.com/watch/instant-indesign/automating-a-catalog-with-data-merge/
    Software
    http://www.65bit.com/home/home.shtm
    Data Merge Tips
    http://www.theindesigner.com/blog/episode-43-data-merge-video

  • What's the unit label of y-axis of PSD when using Spectral Measurement Express VI?

    Hi:
     What's the unit label of y-axis of PSD when using Spectral Measurement Express VI?
    Selected Measurement : Power spectral density
    Result : dB
    No Averaging..
    Is dB/Hz the magnitude label of PSD output? Thx!

    There could be an issue the the Express VI converting your waveform data into the dreaded Dynamic Data Type, which is just causing more and more memory to be used.
    So what I would recommend is use the DAQmx Configure Logging  VI to configure DAQmx to stream the data as you read straight to a TDMS file.  There are various other properties you can set to make the logging go across files.  You just set up the logging before running your task.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Using Solaris 11 Express for a multiprocessor CAD/CAM x86-64 system.

    I'm considering using Solaris 11 Express as the OS for a multiprocessor Computer Aided Design/Computer Aided Manufacturing custom built x86-64 system for my machine shop business. I would like clarification of the license in this situation.
    Would I be allowed to use Solaris 11 for free under the open-source license, or would I have to purchase a commercial license? Would I have to pay for program updates? Does just the Oracle Solaris Premier Subscription for Solaris 11 require payment rather than the actual software as well? Would I be required to purchase an Oracle Solaris Premier Subscription to use Solaris 11 in my situation, or can I purchase the Oracle Solaris Premier Subscription at a later date.
    I have a lot of respect the open-source concept, and I would only use Solaris while keeping it's license intact. So the answers to these questions are very important factors affecting my decision regarding whether or not my company will start to use Solaris.

    I'm afraid you'll have to contact Oracle directly to clarify what applies in your situation.

  • Backup AVCHD Camcorder using Final Cut Express

    I have previously used Final Cut Express to create a backup copy of all the video on my AVCHD Hard Drive Camcorder. However, since that time, I had to reinstall Final Cut Express. I can no longer remember or find how to do this again. Can someone please help? Did apple remove this functionality?

    I just purchased FCE 4 with a new iMac but haven't used it yet. But I do know that iMovie '09 has an Archive feature that will do what you are looking for. It copies the contents of the camera in it's original Full HD format to the hard drive. I do this then import the video to iMovie using the compressed file type. With the original on the hard drive, you can always re-import to iMovie '09 (and FCE 4, I presume) if you want to use the Full HD original format at a later date.
    Santiago

  • Using CASE in Expression

    I've got problem in using CASE statetement Expression (OWB 9.0.4)
    Here's my code :
    CASE INGRP1.PARVW
    when 'RG' then '1'
    when 'WE' then '2'
    end
    then result is "Invalid relational operator" ???
    What does it means ?
    Please send me the correct syntax for using CASE statement
    Thanks
    Vincent

    Here is example from one of my mappings:
    case when trim(INGRP1.STATUS) = INGRP1.L_A then trunc(INGRP1.ACT_DATE)
    when trim(INGRP1.STATUS) = INGRP1.L_S then trunc(INGRP1.ACT_DATE_ALFA)
    when trim(INGRP1.STATUS) = INGRP1.L_C then trunc(INGRP1.ACT_DATE) end
    The datatype of INGRP1.L_A,INGRP1.L_S,INGRP1.L_C,INGRP1.STATUS is char.
    The datatype of output and INGRP1.ACT_DATE is date.
    Your problem might be incompatible datatypes. Please check if the output has the same datatype as your return value.

  • Data Filter on CSV file using Data Synchronization

    gOT error When i used Data Filter on CSV file in Data Synchronization task, Filter condition : BILLINGSTATE LIKE 'CA'
    TE_7002 Transformation stopped due to a fatal  error in the mapping. The expression [(BILLINGSTATE LIKE 'CA')] contains  the following errors [<<PM Parse Error>> missing operator  ... (BILLINGSTATE>>>> <<<<LIKE 'CA')].

    Hi,
    Yes,This can be done through BEx Broadcaster.
    Please follow the below stes...
    1.Open your query in BEx Analyzer
    2.Go to BEx Analysis Toolbar->Tools->BEx Broadcaster...
    3.Click "Create New Settings"->Select the "Distribution Type" as "Broadcast Email" and "Output Format"  as "CSV"
    4.Enter the Recipients Email Address under "Recipients" tab
    5.Enter the Subject and Body of the mail under "Texts" tab
    6.Save the Setting and Execute it.
    Now the Query data will be attached as a CSV file and sent to the recipents through Email.
    Hope this helps you.
    Rgds,
    Murali

  • Data Compression express VI chops off last waveform element

    While using the data compression express vi, I noticed the vi truncates the array of waveforms by removing the last element. 
    When I log this to an excel file, it puts a blank row into it.  I ran this VI twice which appended two runs in teh same log file to show it.
    What is an easy way to delete this last element out of the signal array?
    See the graphs last sample on the x axis of the vi I attached.  Element at x=1.0 has been deleted on the graph thus resulting in a blank row in my excel file.

    Hi Id,
    I think this happens because it is using the data that comes after the point to average that point, though I am uncertain. I will have to look into it further.

Maybe you are looking for

  • Urgent----regarding Cheque printing

    hi, we are using Customise Z forms instead of standard forms. To initiate the cheque creation and printing process, we are using the following: ---SAP Transaction code – FBZP for configuration and F110 to run the APP. SAP Print / Driver Program name

  • File size comparisons, InDesign CS3, CS4 and CS5?

    Hi, all. It seems there was a trend for several major releases where each time Adobe released a new version of InDesign and InCopy, average file sizes grew by 20% or so from the old release to the new release, at least back in the older CS days. Has

  • Zen Touch.. problem with connect

    I have had my mp3 player for about 5 months and the other day I tried connecting it to Windows Media Player and it doesn't work.. it won't connect. It makes the sound like it connected, but nothing happens. HELP! I even redownloaded Windows Media Pla

  • NMH 410 "Remote Access" - Videos Do Not Play

    When accessing my Media Hub from a "remote" location the videos do not play (I only have videos on my Media Hub).  Instead, I get the following error message: Error: Could not play the selected title Windows Media: this media player was detected but

  • SAX Parser For XML

    Hello all, I am trying Parsing XML thorugh SAX. Were to get SJXP.jar and parser.jar files on sun site if any body have these files plz mail :[email protected]