Filtering by current date

HI
I am attempting to filter data based on a "date" column
compared to the current date, depending on certain criteria set by
the client (example they select "please show all data within last
day", or perhaps "Show all data previous 7 days").The current date
has to be set \ updated automaticly and will not be entered by the
client.
so, what i need is a filter than can compare data from the
xml form against the current time.
I have been able to set this up using php coding, but dont
know where to start with Spry.
Any suggests would be greatly appreciated.
Mark

i used xpath to filter my lines by month / year, my date
format is dd.mm.yyyy and an xpath would look like
/data/line[substring(datum,4,2) = "07" and substring(datum,7,4) =
"2006"], but this is not really what you want if using ranges (last
7 days)...
sorting could be done with dsPhotos.setColumnType("datum",
"date");
after sorting (you don't have to sort by date) you could use
a filter function which compares the date with your given range:
var myFilterFunc = function(dataSet, row, rowNumber)
if (PUT YOUR RANGE CONDITION HERE)
return row; // Return the row to keep it in the data set.
return null; // Return null to remove the row from the data
set.
dsPhotos.filter(myFilterFunc); // Filter the rows in the data
set.

Similar Messages

  • How to schedule report filtered by dynamic date based on the date the Agent runs

    Hello
    I have a question about delivering report using OBIEE agent.
    If i am running an agent today to deliver report A, can I get report A based on Last Monday's date or any dynamic dates?
    For example, say today is Dec 18th 2013 and my agent is running according to how I set the schedule. Now the deliver content will have report A being delivered. Now report A has a date column, normally this column is filtered by current date. But if it's delivered through agents to various users, Report A's data should be the previous Monday, so in this case Dec 9th 2013. When this agent is run again said on Dec 27th 2013, then report A should be filtered by Dec 16th 2013, which is the previous monday of Dec 27th.
    Can something like this be achieved in OBIEE 11G?
    Thanks in advance.

    Yala,
    Not a straight forward way
    1) Let the report run through Agent with Current Date filter
    2) once it ran for the first time you can see IBOT name/last run time(LAST_RUNTIME_TS) in  S_NQ_JOB
    Create a repository variable 'last_run_agent' using below sql to get max(LAST_RUNTIME_TS)
    select max(LAST_RUNTIME_TS) from s_nq_job where name = 'AGENT_NAME';
    Edit the analysis report with current date filter and modify the filter condition accordingly to filter on newly created repository variable
    Thanks,
    Saichand

  • Current date, first day of month, last day of month, current week, current

    Hi All,
    may be the question will sounds basic for your guys, I am connecting via MDX a cognos reportnet on a BW 3.0B..due to loads of limitations on filtering via MDX on 'business date/time functions' , I would need to create in the infoqueries that are my data sources, the following additionnal objects:
    - current date
    - first day of current month
    - last day of current month
    - current week
    - current year
    I do not want prefiltered infoqueiries but object with these single values so that from reportnet I can have something like: OCALDAY between 'first day of current month' and 'last day of curent month'
    Is there standard fonction for this under BW/BEX or if we need to developp functions has nayone some code examples.
    thanks a lot for your great input
    David

    Hi,
    In universe level if you want implement the requirede functions then you have to write custom sql and if you want to implement them in Reporting level then most of the functions are available to you. e.g. Quarter,Month, Year, Current Date....
    Cheers,
    Suresh A.

  • Historic and Current data for Master data bearing objects

    Hi All,
    We are trying to implement type 2 dimensions for all the master data bearing characteristics, where we require historic and current data available for reporting. the master data can have a number of attributes and all of them can be time dependent. We are not getting any 'datefrom' or 'dateto' from the source system.
    For example:
    For Example: The table below shows data entering BI at different dates.
    Source Data day of entering BI
    MasterID ATTR1 ATTR2
    123506 Y REWAR day1
    123506 N REWAR day4
    123506 Y ADJUST day4
    123506 N ADJUST dayn
    The field 'day of entry into BI' is only for your understanding; we do not get any date fields from the source. SID is the field we are generating for uniqueness. It is a counter. EFF_DATE would be the current date for all the data. EXP_DATE would be 31.12.9999 until the attributes change. SID and MasterID together would be the key.
    On day 1 the following data enters BI,
    day 1
    SID MasterID ATTR1 ATTR2 EFF_DATE EXP_DATE
    1 123506 Y REWAR 2/10/2009 12/31/9999
    On day 4, 2 data records enter with same PID,
    SID MasterID ATTR1 ATTR2 EFF_DATE EXP_DATE
    2 123506 N REWAR 2/13/2009 12/31/9999
    3 123506 Y ADJUST 2/13/2009 12/31/9999
    the EXP_DATE of the record of day 1 needs to be changed to current date.
    Also there are two records entering, so latest record would have EXP_DATE as 31.12.9999. And the EXP_DATE of the first record on day 4 should change to the current date.
    so the following changes should happen,
    CHANGE
    SID MasterIDATTR1 ATTR2 EFF_DATE EXP_DATE
    1 123506 Y REWAR 2/10/2009 2/13/2009
    CHANGE
    SID MasterID ATTR1 ATTR2 EFF_DATE EXP_DATE
    3 123506 Y ADJUST 2/13/2009 2/22/2009
    On day n, one data record enters with same PID,
    SID MasterID ATTR1 ATTR2 EFF_DATE EXP_DATE
    4 123506 N ADJUST 2/22/2009 12/31/9999
    The change is ,
    CHANGE
    SID MasterID ATTR1 ATTR2 EFF_DATE EXP_DATE
    3 123506 Y ADJUST 2/13/2009 2/22/2009
    The data expected in P-table is as below, on Day n or after Day n, untill any other record enters for this MasterID,
    1 123506 Y REWAR 2/10/2009 2/13/2009
    2 123506 N REWAR 2/13/2009 2/13/2009
    3 123506 Y ADJUST 2/13/2009 2/22/2009
    4 123506 N ADJUST 2/22/2009 12/31/9999
    Has anyone worked on type 2 dimensions earlier? Or any ideas to implement this logic would be appreciated.
    Regards,
    Sudeepti

    Compound the Master ID with eff date and other attribute as superior objects
    so you will get P-table as
    ATTR1   ATTR2   MAT ID  
    1 2/10/2009 2/13/2009 123506 Y REWAR
    2 2/13/2009 2/13/2009 123506 N REWAR
    3 2/13/2009 2/22/2009 123506 Y ADJUST
    4 2/22/2009 12/31/9999  123506 N ADJUST

  • How to show current date in a column of dimension table in ssas

    Hi,
    I have 2 dimension tables (ALLWORK and YOURWORK) and 1 measure table (STATS). In ALLWORK dim table, I have 4 columns, one of them is END_DATE. Based on END_DATE and current date I want to create a named calculation field. To achieve this, I
    want to show the current date in 5th column (of ALLWORK dim table) as calculated member (as named calculation wont show me correct date).
    Problem is, I am not able to create the column in the dimension table. While creating the calculated member, I am not able to select the ALLWORK dimension table, it always selects MEASURE by default. Please help.
    thanks
    Tarique
    thanks and regards Tarique Aslam

    Hi Tarique,
    According to your description, you want to add a column to your dimension to show the current date, right?
    In data source view, we can add named calculation to your table. A named calculation is a SQL expression represented as a calculated column. This expression appears and behaves as a column in the table. A named calculation lets you extend the relational
    schema of existing tables or views in a data source view without modifying the tables or views in the underlying data source.
    Reference
    http://msdn.microsoft.com/en-in/library/ms174859.aspx
    http://devmau5.wordpress.com/2010/03/25/the-getdate-of-mdx/
    If I have anything misunderstand, please point it out.
    Regards,
    Charlie Liao
    TechNet Community Support

  • How to Get Current Date from MS Access in a Select Statement

    From a java method, I want to use JDBC to get the current date from MS Access. In Oracle I would do "select sysdate from dual", but I can't figure out how to do it in MS Access. Here are some of my attempts. I have a table in my Access db called PARM.
    //        String sql = "SELECT '0', NOW() FROM PARM";
    //rs.next() is false
    //        String sql = "SELECT NOW() AS CURR_DT FROM PARM";
    //rs.next() is false
    //        String sql = "SELECT DATE() AS CURR_DT FROM PARM";
    //rs.next() is false
    //        String sql = "SELECT NOW()"; 
    //StringIndexOutOfBoundsException: String index out of range: -1
    //        String sql = "select { fn now() } from parm";
            String sql = "SELECT Date()";
    //java.lang.StringIndexOutOfBoundsException: String index out of range: -1
            ResultSet rs = stmt.executeQuery(sql);
            if (rs.next()) {
                return rs.getString(1);
            } else {
                   return null;
              }

    Why are you getting it as a String? You should be getting it as a timestamp.
    Although getString works for me too. There is something else wrong that you haven't shown.
    Here is some shoddy, but simple, test code that demonstrates it working.
    import java.sql.*;
    public class Test{
      public static void main(String args[])throws Exception{
        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
        Connection c = DriverManager.getConnection("jdbc:odbc:stats");
        Statement s = c.createStatement();
        ResultSet rs = s.executeQuery("SELECT NOW()");
        while(rs.next()){
          System.out.println(rs.getTimestamp(1));     
        rs.close();
        s.close();
        c.close();
    }

  • I have Elements 11. Sometimes, if I edit a photo in Elements Editor, the date gets changed to the current date. Why does that happen? It doesn't happen all the time, so I can't isolate the cause. Any ideas?

    I have Elements 11. Sometimes, if I edit a photo in Elements Editor, the date gets changed to the current date. Why does that happen? It doesn't happen all the time, so I can't isolate the cause. Any ideas?

    I have Elements 11. Sometimes, if I edit a photo in Elements Editor, the date gets changed to the current date. Why does that happen? It doesn't happen all the time, so I can't isolate the cause. Any ideas?

  • Odd Date for Current Date and Time

    I am modifying a column in a list to get current date and time using =TODAY()+NOW() in the calculated field and get a time that is behind by 1 hour but the date is 4 months 114 years ahead (2128). How can I fix this field?

    http://sharepointsolutions.com/sharepoint-help/blog/2011/04/how-to-add-and-subtract-hours-and-minutes-from-date-and-time-fields-in-sharepoint-lists/

  • Option to show values up to last closed fiscal period or up to current date

    Hello,
    How would I create a query that would ask if I want it to calculate values 'up to the current date' or for the 'latest closed fiscal period'.
    Currently I have setup a report, within which, has restricted key figures that will give the 'Period to date', 'Year to Date', and 'Last Year Year to Date' values for some RKFs, however, it would be very helpful if this report could be setup so that the user could choose whether the report provides:
    1. Values only through the last closed fiscal period
    or
    2. Values up to the current date.
    <b>For example</b> if we are in period 7 of 2006, the user could have the report show all values up to the last closed fiscal period, which in this case would be period 6 of 2006.
    Or the user could have the report show all the values up to the current date.
    Hopefully I have been clear,
    Thanks,
    Nick
    Message was edited by:
            Nick Bertz

    Nick,
        What is the problem you are facing? As San mentioned you can only report till Last Fiscal Period using Customer Exit Variables(Calculate Current Fiscal Period using Current Month and Fiscal Year Variant).
    Or as you mentioned you can create restricted Key Figures using Date or month (YTD etc)
    If i miss your requirement, please guide me.
    Regards,
    Nagesh Ganisetti.
    *Assign Points if it helps.

  • FI line items up to the current date

    Hi all,
    I read the SAP note 485958 "BCT-FI:Extracting FI line items up to the current date" and I have some doubts here:
    1. After I've set parameter BWFIOVERLA to 'X' and extract delta at 6PM, will FI data that is changed before 6PM for example a gl entry at 5PM, goes into my delta extraction?
    2. What does BWFITIMBOR mean by having default value 02:00:00?
    3. Is this note applicable if my R3 PI release is at 2003_1_46C?
    Please advise.
    Thank you.
    Celeste

    Hi Celeste,
       Pls go through this link:
    http://help.sap.com/saphelp_nw04/helpdata/en/af/16533bbb15b762e10000000a114084/content.htm
    Excerpts from this link regarding your doubt:
    BWFIOVERLA: The logic of this parameter prevents records with the previous day as their CPU date from still being in the update at the time of extraction.
    If X is set for this parameter, selection is made up to the previous day if the time limit is not reached.
    If <space> is set for this parameter, selection is made up to the day before the previous day if the time limit is not reached.
    BWFITIMBOR: This parameter designates 02.00 (2 A.M.) as the time limit for extraction. If this limit is not reached, the system uses a security interval of one day to determine the To-value of the selection. If extraction is started before 02:00 therefore, the selection takes place only up to the day before the extraction run.
    Hope it helps you!!!!
    Regards,
    Amit

  • Although my ipod shows the number of steps, calories, and time, it no longer is saving it to the history. also when I open the history it takes me to May 2010 instead of the current date. Any ideas on how to get it to start recording the history again?

    Although my ipod shows the number of steps, calories, and time, it no longer is saving it to the history. Also when I open the history it takes me to May 2010 instead of the current date. Any ideas on how to get it to start recording the history again?

    Try:                                               
    - iOS: Not responding or does not turn on           
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try another cable                     
    - Try on another computer                                                       
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar
    The missing apps could have been done by setting the Restrictions that can hid those apps. If the backup was made with those retrictions set the the Restrictions are also restored.
    Thus, if you get it to work restore to factory settings/new iPod, not from backup                               
    You can redownload most iTunes purchases by:        
      Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • Fixed report period based on current date

    I want to create a report containing records over a fixed period without using a date parameter. As a example I would like the report to continually draw on data that is no more than say ten years from the current date.
    E.g. Current date (xx/xx/2008) to (Current date - 10 years) or xx/xx/1998 then next year the formula would automatically adjust to current date (xx/xx/2009) to (Current date - 10 years) or xx/xx/1999.
    I am only a novice when it comes to designing reports so please bear that in mind.

    Hi,
    Create a RecordSelectionFormula and subtract 10 years from the current date with the DateAdd formula.
    E.g.
    //DateAdd (intervalType, nIntervals, startDateTime)
    {Table.Date} > DateAdd ("yyyy", -10, CurrentDate)
    The DateAdd function has more interval types, so you can subtract months, days, hours as well. Check the CR help file and search for DateAdd for details.
    Cheers,
    Fritz

  • How to achive current date in report

    Hi Expeorts,
    I have below Filter in one of report. how to achive this?
    Ship Date = Current Date
    What is the meaning of this? and how to do this?
    Thanks in advance
    David
    Edited by: david Rathod on Jan 10, 2012 7:50 AM

    Hi ,
    You can achieve the same using Customer exit variable .You can use the following code .
    FORM do_user_exit       USING    i_vnam        LIKE rszglobv-vnam
                                     i_vartyp      LIKE rszglobv-vartyp
                                     i_iobjnm      LIKE rszglobv-iobjnm
                                     i_s_cob_pro   LIKE rsd_s_cob_pro
                                     i_s_rkb1d     LIKE rsr_s_rkb1d
                                     i_periv       TYPE rro01_s_rkb1f-periv
                                     i_t_var_range TYPE rrs0_t_var_range
                                     i_step        TYPE i
                            CHANGING e_t_range     TYPE rsr_t_rangesid.
      if i_step = 1.
         clear l_s_range.
         l_s_range-low = sy-datum.
         l_s_range-sign = 'I'.
         l_s_range-opt  = 'EQ'.
         append l_s_range TO e_t_range.
      endif.
    ENDFORM.   
    Hope it helps .
    Thanks
    Kamal

  • Stock Aging report with current date

    Dear Experts
    Can we able to take stock aging report with current date?
    Thanks&Regards,
    Vinoth Raj K

    You're posting in the Portuguese B1 space.
    You might want to post in the English one: SAP Business One Application

  • My ipod is somehow synced to another library, because I plugged the charger to a wall. How can I sync my ipod shuffle back to the original Itunes library without erasing my current data in the Ipod shuffle?

    My ipod is somehow synced to another library, because I plugged the charger to a wall. How can I sync my ipod shuffle back to the original Itunes library without erasing my current data in the Ipod shuffle?

    ",the owner sold the ipod without clearing the songs and since the songs were not puchased from the itunes store then i believe i now own the songs"
    Not true at all.
    It does not matter where the songs came from, they are not yours and the previous owner does not own the right to distribute them to others.
    The law is the same with downloads and cds and any other medium.

Maybe you are looking for

  • Printer driver for HP LaserJet 1020

    What can I use for driver software to be able to print from my MacBook Pro to the HP LaserJet 1020?

  • Can no longer open Pages documents in LibreOffice

    I used to be able to open documents created and  saved as 'Word' documents in Pages with LibreOffice Writer. This is no longer possible. I can still open other documents created with Microsoft office and saved with the .doc extension in LibreOffice W

  • Cannot access class oracle.sql.BLOB;

    Hi, I am trying to save a .tif file into Oracle database. When I run the program in JDeveloper I get the following errors: Error(9,19): cannot access class oracle.sql.BLOB; file oracle\sql\BLOB.class not found Error(59,29): class BLOB not found in cl

  • WMI: Win32_Account class

    Hello! One of our vbs scripts monitors any changes in Win32_Account class: strComputer = "." Set objWMIService = GetObject("winmgmts:{(Security)}\\" & strComputer & "\root\cimv2") Set objEventSource = objWMIService.ExecNotificationQuery ("Select * Fr

  • Cache Sync Issue

    Got the following exception from TopLink cache sycn, this is the only log (Debug level) we got. TopLink version 10.1.3 Please make comments and suggestion? It happened only once so far in production env. Thanks. ClientSession(22616377)--java.util.NoS