Fetching Data with dates

Hi Experts,
I am having this scenario.
PERNR          BEGDA          ENDDA
000001          01.01.2006     13.01.2007
000001          14.01.2007     31.12.9999
000002          14.01.1982     12.11.2006
000002          13.11.2006     31.01.2007
000002          01.02.2007     31.12.9999
This is the scenario my requirement is like that if I will enter PERNR = 1 then it will display 14.01.2007 record. And if I will enter PERNR = 2 then it will display 13.11.2006.
Regards,
Rajneesh Gupta

i don know why u r such awkward requirements.but instead of going for simple HR,u shud go for ABAP-Hr and then write ur code.use LDB PNP.
and use Get pernr event and then move ur concerned data to ur output internal table.
Get pernr event will fetch all the Infotype records for the concerned pernr and then u can have particular one in ur iutput table as per ur requirement.
demo code for using LDBs -
tables: pernr.
infotypes: 0021.
*eject
*& Constants                                                           *
constants: c_1(1)       type c               value '1' .
data: begin of t_output occurs 0,
       num_dep(2) type n,
       pernr like pernr-pernr.
data: end of t_output.
data: count type i.
*eject
*& Initialization                                                      *
Initialization.
Initialize Selection-Screen values
perform init_selction_screen.
Start-of-selection.
get pernr.
  clear t_output.
Read Infotype 0021
  rp-provide-from-last p0021 space pn-begda pn-endda.
  check pnp-sw-found eq c_1.
Gather all the required information related to the emp
  describe table p0021 lines count.
  move: pernr-pernr to t_output-pernr,
        count to t_output-num_dep.
  append t_output.
  Clear count.
*eject
*& End-of Selection                                                    *
end-of-selection.
  perform print_report.
*eject
*&      Form  print_report
*Description:
FORM print_report .
Print the report
  loop at t_output.
  skip 1.
  at sum
  write: 2 t_output-pernr,
         15 t_output-num_dep.
  endloop.
ENDFORM.                    " print_report

Similar Messages

  • Performance question when compare date with date or char with char

    Hello from Germany (Frankfurt) !
    I am working on Oracle 9.2.0.8.0
    and have to solve following problem:
    Comparison of a date and char fields.
    Now two ways to do it.
    Either I compare char with char and convert date to char,
    or I compare date with date and convert char to date.
    Now the performace question. Which operation takes more effort for the database?
    So why not to try and to see the results?
    First create table:
    CREATE TABLE TEST (
    char_date VARCHAR2(8),
    real_date DATE
    NOLOGGING;
    Then insert 1.000.000 rows
    BEGIN
    for x in 1..1000000
    loop
    insert into test (char_date, real_date) VALUES('19990101', TO_DATE('2006.01.01', 'YYYY.MM.DD'));
    end loop;
    COMMIT;
    END;
    Collect statistics
    EXEC dbms_stats.gather_table_stats('TESTER', 'TEST');
    Now run some selects for date to char conversion:
    Elapsed: 00:00:00.00
    SQL> select * from test t where TO_DATE(char_date, 'YYYYMMDD') > real_date;
    no rows selected
    Elapsed: 00:00:03.02
    SQL> select * from test t where TO_DATE(char_date, 'YYYYMMDD') > real_date;
    no rows selected
    And some selects for char to date conversion:
    Elapsed: 00:00:03.02
    SQL> select * from test t where char_date > TO_CHAR(real_date, 'YYYYMMDD');
    no rows selected
    Elapsed: 00:00:02.05
    SQL> select * from test t where char_date > TO_CHAR(real_date, 'YYYYMMDD');
    no rows selected
    Elapsed: 00:00:02.05
    SQL>
    As you see when I compare char with char and convert date to char it seems to be faster (almost 1 second)
    Is the test correct?
    I still not sure, what gets better performance...
    Any idea?
    Thanks!

    Depends on whether you want the right results or not.
    Why don't you run the following two queries and see if the difference in results tells you anything?:
    with t as (select to_date('01/02/2007', 'dd/mm/yyyy') date_col from dual
               union all
               select to_date('02/02/2007', 'dd/mm/yyyy') from dual
               union all
               select to_date('03/02/2007', 'dd/mm/yyyy') from dual
               union all
               select to_date('03/03/2006', 'dd/mm/yyyy') from dual)
    select *
    from   t
    where  date_col < to_date('04/03/2006', 'dd/mm/yyyy');
    with t as (select to_date('01/02/2007', 'dd/mm/yyyy') date_col from dual
               union all
               select to_date('02/02/2007', 'dd/mm/yyyy') from dual
               union all
               select to_date('03/02/2007', 'dd/mm/yyyy') from dual
               union all
               select to_date('03/03/2006', 'dd/mm/yyyy') from dual)
    select *
    from   t
    where  to_char(date_col) < '04/03/2006';

  • Replacement of FORECAST DELIVERY DATE with DATE OF FIRST RECEIPT

    Please help me in my scenario below and post your valuable comments-
    My Scenario is like -
    For example, In REPORT, For the item 10 of the order 4700035361 our FIRST RECEIPT DATE is in march (14/03/2011) and FORECAST DELIVERY DATE is in december (30/12/2011). This purchase order item was completely received.
    Requirement is like---
    Associated cube is ZCUIMP01.
    (1) The evolution will consist of replace the FORECAST DELIVERY DATE with FIRST RECEIPT DATE of the item.
    (2) The period (Fiscper and Fiscyear) will also be modified.
    (3) Hence the calculation of the YTD will take into account the order and its receipt date.
    (4) The adjustment of the history will be necessary for the year 2011.
    Can anyone suggest, from where i should start my analysis (Should it be Infocube level??).
    What will be the approach to fulfill all the above mentioned requirement (Should we think about Remodeling concept for creating new data model, if yes then how to do?).
    Please reply asap, it will be great help for me.
    My advance thanks to you.
    Thanks & Regards
    Rupali Singh

    Hi Rupali,
    As I understand there is a business change that you need to justify in our report. Unfortunately your explanation of the design has a considerable gap to visualize. In any case, if you need help on to how to approach such a change -
    1. Understand the business change, its purpose and its imapct on your current design and the report.
    2. Understanding the purpose is very important since you will then be able to find workarounds, redesign as per the change required.
    3. Start from the query and check if your replacement of characterisitics with new characteristics can be obtained using functions like Replacement path, attributes, customer exits, etc. Changing a query/creating a new report on the existing model is the most feasible option.
    4. If not, try exploring option to keep the design untouched, and creating a new InfoObject/DSO like structure to capture the date modifications, etc which then can be used on a MultiProvider.
    Hope the above helps!
    Regards,
    Kunal Gandhi

  • How i map the caf data with data of UWL in web dynpro

    Hi Experts,
    i created a bpm project with nwce 7.1.1 and it have a independent caf to keep it's data and status.
    now i have to create a view(use web dynpro) such like UWL,
    my question is
    how i map the caf data with UWL, and let the view can open the task(popup a window, just like UWL do) for user to finish their job?
    thanks.

    Hi Vic
    Your requirement is exect functionality of UWL based on WEBDYNPRO, CAF and BPM for automation? ,and question is How to use CAF with WD or CAF with UWL API's ?. please clarify it.
    Please fo through from given doc misght give u some idea
    1. [How to develop Web Dynpro UI for your CAF project |http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417300)ID0722080650DB02400261803144436507End?blog=/pub/wlg/5414]
    Best Regards
    Satish Kumar

  • Filtering data with date birth

    Hi ,
    i added a field(date of birth) in Candidate search page in irecruitment through Additional Search criteria DFF..
    This search filtering the data whatever date of birth matching record .But i need candidates having date of birth on or before my entered value .
    How do i get this ?
    Is it possible througd personalization ?
    pl guide me ..
    regards,
    kumar
    Message was edited by:
    kumarduraipandi

    Can you check if the page uses a query region, if yes then you can enable advanced search programmatically by setting a property on the queryBean. If it is a manual search region then you can add the items through personalization and write code in the controller and AM by extending them. You can do the same with query region simple search panel as well.

  • Query For Retrieving Data With Date

    Hi Guys
    I am having a hard time to figure out the sql query.
    I have a table with data. Below is the illustration.
    date location
    item
    1 jan 14 A
    apple
    2 jan 14 A
    apple
    3 jan 14 B
    apple
    4 jan 14 B
    apple
    1 jan 14 A
    orange
    2 jan 14 A
    orange
    3 jan 14 B
    orange
    4 jan 14 B
    orange
    My question it how to get the latest date on each location and item
    This is the result I want
    date location
    item
    2 jan 14 A
    apple
    4 jan 14 B
    apple
    2 jan 14 A
    orange
    4 jan 14 B
    orange
    Thanks.

    Try the below:
    create table #temp (sdate datetime,location char(1),Item varchar(20))
    insert into #temp values('1 jan 14','A','Apple')
    insert into #temp values('2 jan 14','A','Apple')
    insert into #temp values('3 jan 14','B','Apple')
    insert into #temp values('4 jan 14','B','Apple')
    insert into #temp values('1 jan 14','A','Orange')
    insert into #temp values('2 jan 14','A','Orange')
    insert into #temp values('3 jan 14','B','Orange')
    insert into #temp values('4 jan 14','B','Orange')
    ;With cte as
    Select * , Row_Number()Over(partition by location, item order by sdate desc) Rn
    From #Temp
    Select * From cte Where rn=1 Order by Item asc,location asc
    drop table #temp

  • Query For Retrieving Data With Date and grouping

    Hi Guys
    I am having a hard time to figure out the sql query.
    I have a table with data. Below is the illustration.
    date location  item description
    1 jan 14 A  apple desc1
    2 jan 14 A  apple desc2
    3 jan 14 B  apple desc1
    4 jan 14 B  apple desc2
    1 jan 14 A  orange desc1
    2 jan 14 A  orange desc2
    3 jan 14 B  orange desc1
    4 jan 14 B  orange desc2
    My question it how to get the latest date on each location and item along with the description field
    This is the result I want
    date location  item description
    2 jan 14 A  apple desc2
    4 jan 14 B  apple desc2
    2 jan 14 A  orange desc2
    4 jan 14 B  orange desc2
    Thanks.

    provided it a datetime/date field you've for date you can do this
    SELECT [date],location,itemdescription
    FROM
    SELECT [date],location,itemdescription,
    ROW_NUMBER() OVER (PARTITION BY location ORDER BY [date] DESC) AS Rn
    FROM table
    )t
    WHERE Rn = 1
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to repeat data with Data Merge?

    How can I repeat data in the same text block with Data Merge? I have an Excel file with a class schedule that I need to import but when I use Data Merge, it wants to create a new page for each line. I want to keep the data in one text block per page and use Data Merge so when I get the new Excel file, it will be easy to update. This seems like it would be a simple thing to do, but I can't find the answer. Can anyone help?

    Time for me to sound like a broken record. Data merge could be used for this but I don't think it was ever intended for such recurring publications like you are making. There will always be a lot of repetitive work that always will need to be performed after each update.
    Instead, I think you should read up on using an XML workflow. Now, the XML out of excel needs transformed to be viable inside ID. But that is reasonably easy and can be done in an XML editor or upon importing into ID. Though it has been set aside for a time, I am making an example of a college course catalog for a customer. I'll see if I can finish it off by the weekend. If so, I'll post it to this thread.
    Take care, Mike

  • Incorrect date with date from Windows ics Files since installing OS X Mountain

    since installing OS X mounting the introducing fo dates with windows ics files is 5 month earlier. With iPhone no problem.

    I'm having the same problem on my late 2008 MBP 15".  Never had a problem before installing Mountain Lion.   Now I have to reboot about 4-5 times a week.
    My computer doesn't lock up completely.    But Wi-Fi stops (you see only one black line on the WiFi icon), the clock stops (I was wondering why it seemed so early earlier tonight - the clock had been stopped for two hours) and many, but not all applications are "not responding".    However, if I try to quit the applications that appear to be okay, then they also become "not responding".   I have to force shut each application and then I can reboot using the Apple>Restart... command.
    One of the things I've noticed is that many times it's iTunes that has the "not responding" message when the other apps don't, even if I haven't used it.   I'm going to Quit iTunes and see if it still happens.  
    I don't think it's heat related.  My computer feels no hotter than it ever did.
    If 10.8.1 fixes this, I'm okay with it (although it was still sloppy for Apple to release with such a bug.)    But the question is whether Apple even knows about it, since they provide no mechanism for non-developers to report bugs.   

  • Loading data with dates using SQL*Loader

    Dear everyone
    I am currently trying to load some data containing dates using SQL*Loader.
    For termination of fields I have been using ^ because I have some book titles which contain " and ' as part of their title. I found that the TO_DATE function did not seem to work using ^ instead of ". Would I be correct? I think the Oracle manual says that " must be used.
    After some Web research I eventually amended my control file to as follows:
    load data
    infile 'h:\insert_statements\22_insert_into_SCAN_FILE_INFO.txt'
    REPLACE
    into table SCAN_FILE_INFO
    fields terminated by "," optionally enclosed by '^'
    TRAILING NULLCOLS
    (scan_id, scan_filename
    file_format_id
    orig_scanning_resolution_dpi
    scanner_id, scanner_operator_id
    scanning_date "TO_DATE (:scanning_date, 'YYYY-MM-DD')"
    original_map_publication_id
    reprint_publication_id)
    A simple line of data is as follow:
    280001, ^1910 - London^, 270001, 400, 250001, 260001, "TO_DATE('2007-06-06', 'YYYY-MM-DD')", 200019,
    The final column being null.
    However when I attempt that I get the following error message:
    Record 1: Rejected - Error on table SCAN_FILE_INFO, column SCANNING_DATE.
    ORA-01841: (full) year must be between -4713 and +9999, and not be 0
    If I change the scanning_date part to:
    scanning_date "EXPRESSION TO_DATE (:scanning_date, 'YYYY-MM-DD')",
    or
    scanning_date "CONSTANT TO_DATE (:scanning_date, 'YYYY-MM-DD')",
    I get the error message:
    Record 1: Rejected - Error on table SCAN_FILE_INFO, column SCANNING_DATE.
    ORA-00917: missing comma
    As soon as I do the following:
    scanning_date "EXPRESSION, TO_DATE (:scanning_date, 'YYYY-MM-DD')",
    or
    scanning_date "CONSTANT, TO_DATE (:scanning_date, 'YYYY-MM-DD')",
    I get too many values error message:
    Record 1: Rejected - Error on table SCAN_FILE_INFO.
    ORA-00913: too many values
    I also tested out scanning_date DATE "YYYY-MM-DD", but that just gave the same ORA-01841 error message as above.
    I must be doing something very simple which is wrong but I cannot figure it out.
    Kind regards
    Tim

    And why do you have scanning date as "TO_DATE('2007-06-06', 'YYYY-MM-DD')" in your infile? All you need is 2007-06-06. If you can not change infile generation code, use:
    load data
    infile 'h:\insert_statements\22_insert_into_SCAN_FILE_INFO.txt'
    REPLACE
    into table SCAN_FILE_INFO
    fields terminated by "," optionally enclosed by '^'
    TRAILING NULLCOLS
    (scan_id, scan_filename
    file_format_id
    orig_scanning_resolution_dpi
    scanner_id, scanner_operator_id
    scanning_date "TO_DATE(REPLACE(REPLACE(:scanning_date,'TO_DATE('),'''YYYY-MM-DD'')'), 'YYYY-MM-DD')"
    original_map_publication_id
    reprint_publication_id)SY.

  • Create table from external data with dates

    I have a CSV that looks somewhat like this:
    abcuser,12345,5/12/2012,5,250.55
    xyzuser,67890,5/1/2012,1,50
    ghjuser,52523,1/1/1900,0,0
    When I create the external table, then query it I get a date error:
    CREATE TABLE xtern_ipay
    userid VARCHAR2(50),
    acctnbr NUMBER(20, 0),
    datelastused DATE,
    number_rtxns NUMBER(12, 0),
    amtused NUMBER(12, 0)
    organization external ( TYPE oracle_loader DEFAULT directory "XTERN_DATA_DIR"
    ACCESS parameters (
    records delimited BY newline fields terminated BY "," )
    location ('SubscriberStatistics.csv') ) reject limit UNLIMITED;
    Error I see in the reject log:
    Field Definitions for table XTERN_IPAY
    Record format DELIMITED BY NEWLINE
    Data in file has same endianness as the platform
    Rows with all null fields are accepted
    Fields in Data Source:
    USERID CHAR (255)
    Terminated by ","
    Trim whitespace same as SQL Loader
    ACCTNBR CHAR (255)
    Terminated by ","
    Trim whitespace same as SQL Loader
    DATELASTUSED CHAR (255)
    Terminated by ","
    Trim whitespace same as SQL Loader
    NUMBER_RTXNS CHAR (255)
    Terminated by ","
    Trim whitespace same as SQL Loader
    AMTUSED CHAR (255)
    Terminated by ","
    Trim whitespace same as SQL Loader
    error processing column DATELASTUSED in row 1 for datafile g:\externaltables\SubscriberStatistics.csv
    ORA-01858: a non-numeric character was found where a numeric was expected
    error processing column DATELASTUSED in row 2 for datafile g:\externaltables\SubscriberStatistics.csv
    ORA-01858: a non-numeric character was found where a numeric was expected
    error processing column DATELASTUSED in row 3 for datafile g:\externaltables\SubscriberStatistics.csv
    ORA-01858: a non-numeric character was found where a numeric was expected
    Any ideas on this? I know I need to tell oracle the format of the date on the external file, but I can't figure it out.

    Try this:
    CREATE TABLE xtern_ipay
       userid         VARCHAR2 (50)
    , acctnbr        NUMBER (20, 0)
    , datelastused   DATE
    , number_rtxns   NUMBER (12, 0)
    , amtused        NUMBER (12, 2)
    ORGANIZATION EXTERNAL
        ( TYPE oracle_loader DEFAULT DIRECTORY "XTERN_DATA_DIR"
    ACCESS PARAMETERS (
    RECORDS DELIMITED BY NEWLINE FIELDS TERMINATED BY "," MISSING FIELD VALUES ARE NULL
    (   userid
      , acctnbr
      , datelastused DATE 'mm/dd/yyyy'
      , number_rtxns
      , amtused)
    location ('SubscriberStatistics.csv') ) reject LIMIT unlimited;
    select * from xtern_ipay;
    USERID                                                ACCTNBR DATELASTU NUMBER_RTXNS    AMTUSED
    abcuser                                                 12345 12-MAY-12            5     250.55
    xyzuser                                                 67890 01-MAY-12            1         50
    ghjuser                                                 52523 01-JAN-00            0          0
    {code}
    Sorry I had to correct the previous statement again for the date format and for the column amtused that was defined without decimals.
    Regards
    Al
    Edited by: Alberto Faenza on May 31, 2012 6:34 PM
    wrong date format mm/dd/yy instead of dd/mm/yy
    Edited by: Alberto Faenza on May 31, 2012 6:40 PM
    Fixed again the date format and the amtused defined with 2 decimals                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • SQL Developer tool sometimes does not display data with date type

    run the following query using the sql developer tool -
    select effective_date from table1 where id = 123;
    (the effective_date is stored in the database as date.)
    one record is returned with no date in the filed.
    However, if I change the query to
    select to_char(effective_date, 'mm/dd/yyyy') from table1 where id = 123;
    one record is returned with effective date.
    Why?
    Thanks for your help.

    First off, there is a dedicated SQL Developer forum where lots of the developers hang out. Those folks are way more knowledgable that we are about the tool.
    That said, I have no problem displaying dates. Do you just have a problem with this particular query/ field/ table? Or does it affect all dates? What version of SQL Developer are you using? 1.1 is out now.
    Justin

  • Filtering data with Dates

    Hi guys I need some assistance: i have a table with the following:
    A     B     C     D
    93660000     abc      abc      1/01/2003 1:00:34 AM
    93660000     abc      abc      1/01/2003 1:00:34 AM
    93661111     def      def      2/02/2003 2:05:40 AM
    93661111     def      def      2/02/2003 2:05:31 AM
    93662222     ghi      ghi      3/03/2003 3:05:33 AM
    93662222     ghi      ghi      3/03/2003 3:05:30 AM
    93663333     jkl      jkl      4/04/2003 4:05:30 AM
    93663333     jkl      jkl      4/04/2003 4:05:20 AM
    All i want is to check column A against Column D by each row (check for duplicates), that is show me results where column A and Column D are the same anywhere else in the table (give or take a 5 second gap for the date, ie: -/+ 5 seconds). I have had some code below which seemed to work at one stage but isnt finalised. Could someone please assist me?
    SELECT *
    FROM (
              SELECT A,B,C,D,
                   ROW_NUMBER() OVER
                   ( PARTITION BY A, D_FV
                   ORDER BY 1 ) AS rn
              FROM (
                   SELECT A,B,C,D,
                        FIRST_VALUE(D) OVER
                        ( PARTITION BY A
                        ORDER BY D
                        RANGE BETWEEN 5/86400 PRECEDING AND 5/86400 FOLLOWING ) AS D_FV
                   FROM This
    WHERE rn = 1;
    This query returns back :
    A     B     C     D
    93665496     abc      abc      1/01/2003 1:00:34 AM
    93665496     def      def      2/02/2003 2:05:31 AM
    93665496     def      def      2/02/2003 2:05:40 AM
    93665496     ghi      ghi      3/03/2003 3:05:30 AM
    93665496     jkl      jkl      4/04/2003 4:05:20 AM
    93665496     jkl      jkl      4/04/2003 4:05:30 AM
    BUT it should only return back:
    ROW 1 (as column A and Column D are the same)
    ROW 5 (as column A and Column D are the same (within 5 seconds))
    Cheers
    George

    Actually dont worry about my last thread, I have figured it out.
    However I have a new problem with this code you have given me. lol.
    the problem is that it doesnt return the duplicated records if the table has more that one duplicate. i.e: if the table is like this:
    A     B     C     D
    93665496     abc      abc      1/01/2003 1:00:30 AM
    93665496     abc      abc      1/01/2003 1:00:32 AM
    93665496     abc      abc      1/01/2003 1:00:34 AM
    93665496     abc      abc      1/01/2003 1:00:34 AM
    93665496     def      def      2/02/2003 2:05:31 AM
    93665496     def      def      2/02/2003 2:05:40 AM
    93665496     ghi      ghi      3/03/2003 3:05:33 AM
    93665496     ghi      ghi      3/03/2003 3:05:34 AM
    93665496     jkl      jkl      4/04/2003 4:05:20 AM
    93665496     jkl      jkl      4/04/2003 4:05:30 AM
    93665000     asd      sdf      5/05/2003 5:00:20 AM
    93665000     asd      sdf      5/05/2003 5:00:31 AM
    Then your query only returns back:
    93665496      abc      abc      1-Jan-2003 1:00:34
    93665496      ghi      ghi      3-Mar-2003 3:05:34
    When it should return back: (i want to return back all duplicates, no matter what combination as long as Column A and Column D match (given +/- 5 second) i.e:
    93665496      abc      abc      1-Jan-2003 1:00:30
    93665496      abc      abc      1-Jan-2003 1:00:32
    93665496      abc      abc      1-Jan-2003 1:00:34
    93665496      ghi      ghi      3-Mar-2003 3:05:34
    Any help would be appreciated
    Thanks
    George

  • Loading data with data workshop

    Hello,
    We load lots of .csv files into apex using the Dataworkshop tool in Apex. Most .csv files are 60-75K rows of data. It used to take just minutes and was quick and easy way to load data. However, recently it has started taking much much longer (as in several hours vs. 5 or 6 minutes normally) to load data this way into production.
    Any ideas of why all of a sudden it takes much longer to load data this way? Is there anything that can be tuned?
    We are running Application Express 4.1.1.00.23 on RH 5 linux with 11.2.0.2 database.
    Thank you for any help you can provide.
    Thank you,
    Mark

    Mehabub,
    Thank you for responding. In a sense that is kind of what we are doing. We truncate the table and upload our .csv to this table and then process into our other tables.
    The table does not have a particularly large number of rows (usually 60,000 - 70,000 rows), but does have 112 columns.
    It all seems to work fine in our test environment, but there are not the number of users there as in production. We have been looking at the SGA parameters and seem to make headway, but then the customer tries to upload and it slows way way down in production.
    Our customers really like this functionality we have given them with apex, but I am running out of ideas of what to look at.
    Thank you,
    Mark

  • Compare current date with dat from db by JSTL

    hi all
    I use
    <tr><c:forEach items="${allFound}" var="found" varStatus="myRow">
    <td><c:out value="${found.submitDate}"/></td>
    </tr>
    </c:forEach>
    to past some value out of db
    how can I compare this submitDate with Current Date by JSTL
    Thank you!

    Whether or not you can compare it depends on what the type of "${found.submitDate} is coming from the Database.
    I am going to presume it is a java.util.Date.
    You can get the current date like this
    <jsp:useBean id="now" class="java.util.Date"/>
    You can then compare them using an EL expression:
    {code}
    <c:if test="${submitDate < now}">
    We have not yet reached the submit date.
    </c:if>{code}
    EL uses the java compareTo methods, so both of your objects +must+ be of the same class in order for this comparision to work.
    If you get back a String from the database, you would have to use <fmt:parseDate> to get a java date.
    If you get back a java.sql.Date from the database, it would get trickier. The hack would be to go java.sql.Date -> String -> java.util.Date using <fmt:formatDate> and <fmt:parseDate>
    Hope this helps,
    evnafets

Maybe you are looking for

  • Missing resolution lines system preferences-- display

    Hi, I've recently got a mac mini which I've got hooked up to a Samsung syncmaster 205BW (which has a native resolution of 1680x1050) Initially when I set it up I had no problems getting that resolution set in Mac OS X, however I've put it on a KVM wi

  • HP LaserJet P1102w can't establish wireless connection

    I am trying to establish a wireless connection between my Mac (OS X 10.7.5) and printer. I have followed the instructions on the hp website, up to the point where I open "Open Printer Utility" and click on "HTMLConfig". However, every time I click on

  • Photo Album inconsistency

    One of two albums in MobileMe Gallery online does not appear on the iPhone "Photo Album" section but appears in the iPhone MobileMe Al bum menu to which photos can be sent.Indeed photos sent this way appear in the correct Album but do not appear on t

  • CS6 InDesign install errors

    I have CS5 Illustrator and Photoshop installed, and now I'm trying to install CS6 InDesign.  I get an error message that the installer can't be initialized.  I've ran the Adobe Support Advisor that gave me that message.  I've done all the corrective

  • I web 09 password protect

    Hi Is there a way to password protect the website in iweb 09?