Date query doesn't show results for today's date

Hello everyone. I use Jdeveloper 11.1.1.3.0 with ADF and I have a view named query with just one field, Date. The operator it is using is equal to a value written in the field. The problem is that when I insert a row into the table (the date is automatically set to the current date on insertion) and I look for today's date it returns nothing. However if I leave the field empty it will find me the row. I tried doing this with the timestamp option but it's not very user friendly as the user would have to type in the time the row was inserted in order to find it, or use the between operator for two fields which is something I want to avoid if at all possible
The requirement is one field query that lets the user choose a date from a calendar and shows all rows inserted on that date (even if the date is today and the row was inserted a few minutes before).
Edited by: Dino2dy on Apr 6, 2011 2:50 AM

Dino2dy,
My guess is that the data being stored in the DB has a time component associated with it (as it would if you were using something like SYSDATE to populate it). When you are trying to look for data with today's date, you are checking just for the date - which in Oracle is the equivalent of midnight on the start of the date. The dates don't match because the time is different.
Either store the date with no time component (use TRUNC to remove the time), use a BETWEEN comparison, or TRUNC the date when comparing.
John

Similar Messages

  • Search in Mail doesn't show results after Migrating

    If I search for a word or an adr. in Mail nothing show up. Unless I've just read the mail. Like that newly read email is the only one being searched in ..?
    This happened after moving my user account to a new MacPro with Migration Assistant.
    (first a clean install of 10.7 on a new disk in bay 1 on the "new" MacPro and updating to 10.7.5 - Starting up from the new disk with my "old" HD in bay 2 on the new machine and using Migration Assistant to move all my data over to the new disk in bay 1)
    Same Mac OSX version, but MacPro version from 1.1 to 3.1
    Also Spotlight doesn't show results.
    Is there a way to make a new "search cache" or whatever that overview file is called ...
    Suddenly now, when not getting any search results, I see how much I use search in Mail and Spotlight ... !
    Thanks

    Try posting this in the 10.7 Mail forum. You'll get more help there.
    DALE

  • Abandoned Cart report doesn't show results any more

    Does anyone know why the Abandoned Cart report doesn't show results any more? We know we have has some occur in the past.

    Hi MandaWeb2,
    This was reported as a bug to the dev team. I don't have an ETA for you on when it will be fixed, but it's certainly with them.
    Cheers,
    -mario

  • [svn:osmf:] 17940: Fix FM-982: MAST plugin doesn' t show preroll for F4M resources.

    Revision: 17940
    Revision: 17940
    Author:   [email protected]
    Date:     2010-09-29 14:47:13 -0700 (Wed, 29 Sep 2010)
    Log Message:
    Fix FM-982: MAST plugin doesn't show preroll for F4M resources.
    Ticket Links:
        http://bugs.adobe.com/jira/browse/FM-982
    Modified Paths:
        osmf/trunk/plugins/samples/MASTPlugin/org/osmf/mast/MASTPluginInfo.as
        osmf/trunk/plugins/samples/MASTPluginNew/org/osmf/mast/MASTPluginInfo.as

  • [svn:osmf:] 17941: Fix FM-981: MAST plugin doesn' t show preroll for SMIL resources.

    Revision: 17941
    Revision: 17941
    Author:   [email protected]
    Date:     2010-09-29 15:04:11 -0700 (Wed, 29 Sep 2010)
    Log Message:
    Fix FM-981: MAST plugin doesn't show preroll for SMIL resources.
    Ticket Links:
        http://bugs.adobe.com/jira/browse/FM-981
    Modified Paths:
        osmf/trunk/plugins/samples/MASTPlugin/org/osmf/mast/MASTPluginInfo.as
        osmf/trunk/plugins/samples/MASTPluginNew/org/osmf/mast/MASTPluginInfo.as

    I am modifying the correct httpd.conf file on the server, it just doesn't seem to work. - If I put the rewrite rules in the <Directory /> the rewrite works but it adds /Library/WebServer/Documents to the URL.
    I also tried putting the rewrite rules in <IfModule mod_rewrite.c> but that did not work either.
    mod_rewrite is enabled and running on the server.
    I will post the rewrite rules again in the code brackets. Sorry for the long post. - If some one can try them out on their Leopard Server to see if they can get them to work, it would be much appreciated. Again, these work on my Leopard Client but I can't get them to work on Server.
    -- The httpd.conf file posted above is just the default conf file found in /private/etc/apache2/
    <code>
    RewriteEngine On
    Options +FollowSymLinks
    RewriteRule ^(.+)/$ http://%{HTTP_HOST}$1 [R=301, L]
    RewriteCond %{THE_REQUEST} ^GET\ ([^\?]+)\.php(.*)\ HTTP
    RewriteRule (.+)\.php(.*)$ $1$2 [R, L]]
    RewriteCond %{THE_REQUEST} ^GET\ ([^\?]+)\.asp(.*)\ HTTP
    RewriteRule (.+)\.asp(.*)$ $1$2 [R, L]]
    RewriteCond %{THE_REQUEST} ^GET\ ([^\?]+)\.aspx(.*)\ HTTP
    RewriteRule (.+)\.aspx(.*)$ $1$2 [R, L]]
    RewriteCond %{THE_REQUEST} ^GET\ ([^\?]+)\.htm.(.)\ HTTP
    RewriteRule (.+)\.htm.(.)$ $1$2 [R, L]]
    RewriteCond %{THE_REQUEST} ^GET\ ([^\?]+)\.cfm(.*)\ HTTP
    RewriteRule (.+)\.cfm(.*)$ $1$2 [R, L]]
    RewriteCond %{THE_REQUEST} ^GET\ ([^\?]+)\.bak(.*)\ HTTP
    RewriteRule (.+)\.bak(.*)$ $1$2 [R, L]]
    RewriteCond %{THE_REQUEST} ^GET\ ([^\?]+)\.inc(.*)\ HTTP
    RewriteRule (.+)\.inc(.*)$ $1$2 [R, L]]
    RewriteCond %{THE_REQUEST} ^GET\ ([^\?]+)\..(.)\ HTTP
    RewriteRule (.+)\..(.)$ $1$2 [R, L]]
    <code>

  • Select statement for today's date

    Hi,
    I need to write  a select query which fetches all  the entries of a table for today's date , how do i do it pls..

    Hi,
    SELECT <field-names to retrieve>
       FROM <database table name>
        INTO  TABLE <internal table name>
    WHERE <date field name> eq sy-datum.
    or
    SELECT * FROM <database table name>
        INTO  TABLE <internal table name>
    WHERE <date field name> eq sy-datum.
    this statement will fetch all the data's from your database table with respect to your date field. use parameter or select option to get the field value...then finally use
    loop at <itab>
    write: / <itab-field>.
    endloop.

  • My ipod touch 4g doesn't show option for os update in setting-general page. Can i update it via itunes by connecting it to computer?

    My ipod touch 4g doesn't show option for ios update in setting-general page. Can i update it via itunes by connecting it to computer?

    Try:
    - iOS: Not responding or does not turn on
    When it says place the iPod in recovery mode ue one of these programs:
    For PC
    RecBoot: Easy Way to Put iPhone into Recovery Mode
    If necessary:
    Download QTMLClient.dll & iTunesMobileDevice.dll for RecBoot
    For MAC or PC
    The Firmware Umbrella - TinyUmbrella
    - 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 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       

  • ITunes doesn't show updates for those Apps synchronized from iPhone

    For example, if I download 3 apps through itunes, then download and install 2 apps on my iphone. After synchronizing the PC and iphone, both of them have 5 apps. Once all of them have updates available, the app store on my iphone can show 5 updates, but iTunes only shows 3 updates, it doesn't show updates for the other two apps. Is it a setting issue? please help me if anyone has answer. Thank you.

    I am syncing on my MacBook that I have had for about two months...?

  • How to add custom line for today's date

    Hi,
    I want to add one vertical line for today's date on my line chart.
    Is it possible to draw custom line dynamically in line chart.
    Thanks in advance
    Madhuri

    I think you will probably need CRChart by ThreeD Graphics (www.threedgraphics.com).  AFAIK, it's written by the guys who supply the charting module to Crystal, so integrates 100%, even if it's a bit fiddly.
    It's a bit pricey (more than CR!), but if you need that functionality, it's about your only option. I've bought it do add a 'your average' linesymbol and 'everyone's average' linesymbol to a chart.
    Essentially, it uses macros to plot user defined lines, box fills, shapes etc onto your chart.
    You put something like this into the text fields of the chart:
    @user_line 0,0,3,100 = draw a line from the 0,0 point to the 3rd group, 50th y-value.
    You can use variable to define these points, so if you have a chart in a group, it'll display a different line position for each group.

  • A query to create sales information for a specific date.

    Hi,
    Please look at attached image, you will see how this query look like. This query will generate all sales from 1/1/2014 until today. I would like to see if the query can create the sales report for a range from 1/1/2014 until yesterday (does not included any sales for today). Any help will be appreciated.
    -Bill

    Hi Bill,
    The query attached looks like it is selecting results based on the salesorder name starting with the current year. As is written, it won't be able to filter out today.
    If you want to exclude today, you'll need to modify the current selectivity predicate for today to perhaps a BETWEEN predicate ( e.g. table.datefield BETWEEN '2014-01-01' and DATEADD(day,-1,GETDATE()) ) or add an exclusion predicate ( e.g. table.datefield <> DATEADD(day,-1,GETDATE()) ).
    Note that you'll need to have a field in the data that has the day. Your query does not have any schema information, and all it seemingly reveals is that a salesorder name starts with the current year.
    Hope this helps,
    Tyson

  • Af:chooseDate always shows wrong selection (today's date)

    Hi,
    I'm using 10.1.3.3. I think that the af:chooseDate component has a serious usability problem: it's always showing today's date as currently selected, although the related af:selectInputDate component is refreshed correctly. This is true even:
    - after any number of clicks (selections),
    - after changing the month back and forth,
    - when using different types (Date, Calendar, String) of bound variables (e.g. in a session bean),
    - when the bound variable has a default value,
    - when triggering additional PPR refresh event for the component (just to be sure that it's refreshed).
    Does anybody have any ideas how to make it work correctly? This behaviour is very confusing for the users and I really need to use this component instead of a popup window offered by af:selectInputDate.
    Thanks in advance,
    Patrik

    Frank, I think that's just another description of the problem. Though it does not have a state, it knows about the input field - so the selection should be refreshed via PPR or JavaScript. In case anybody is interested, here is the JS i wrote to solve this.
    // Mark clicked day as selected in an af:chooseDate component
    function markClickedDayAsSelected(e) {
        var eventSourceElement;
        if(e==null) {
            eventSourceElement = event.srcElement; //IE
        else {
            eventSourceElement = e.target; //FF
        if (eventSourceElement.className != "x4r" && eventSourceElement.nodeName == "A") {
            var days = document.getElementById("formId:chooseDateId").getElementsByTagName("tbody")[0].getElementsByTagName("tr")[1].
    getElementsByTagName("td")[0].getElementsByTagName("table")[0].getElementsByTagName("tbody")[0].getElementsByTagName("span");
            for (var i=0; i<days.length; i++) {
                var d = days;
    if (d.className=="x4r") {
    // Move innerHTML outside of SPAN.x4r (into A) and remove SPAN.x4r
    var newInner = d.innerHTML;
    var appendToNode = d.parentNode;
    appendToNode.innerHTML=newInner;
    break;
    // Move innerHTML into a new SPAN.x4r inside A
    var newSpan = document.createElement("span");
    newSpan.className="x4r";
    var inner = eventSourceElement.innerHTML;
    newSpan.innerHTML=inner;
    eventSourceElement.innerHTML="";
    eventSourceElement.appendChild(newSpan);
    Regards,
    Patrik

  • Refining a query to only show entries for the current week

    Hello.
    Does anyone know how to modify a query to only show records that have dates in the current week? Records have a start date and a finish date so the query should recognise that an entry may be valid for more than one week?
    Kind Regards,
    swelch

    Assuming week ends on a saturday and dates aren't NULL - change as appropriate - this is one way
    All rows....
    SELECT TO_CHAR (begin_date, 'DD-Mon-YYYY HH24:MI:SS') AS begin_date
    , TO_CHAR (end_date, 'DD-Mon-YYYY HH24:MI:SS') AS end_date
    FROM mydates
    ORDER BY begin_date;
    BEGIN_DATE,END_DATE
    05-Jul-2011 06:49:25,15-Jul-2011 06:49:25
    05-Jun-2011 06:48:57,15-Jun-2011 06:48:57
    15-Jun-2011 06:48:29,25-Jun-2011 06:48:29
    25-Jun-2011 06:47:57,05-Jul-2011 06:47:57
    Current week rows....
    SELECT TO_CHAR (begin_date, 'DD-Mon-YYYY HH24:MI:SS') AS begin_date,
    TO_CHAR (end_date, 'DD-Mon-YYYY HH24:MI:SS') AS end_date
    FROM mydates
    WHERE TRUNC (begin_date) < NEXT_DAY (TRUNC (SYSDATE) - 1, 'Sat') + 1
    AND TRUNC (end_date) > NEXT_DAY (TRUNC (SYSDATE) - 1, 'Sat') - 7
    ORDER BY begin_date
    BEGIN_DATE,END_DATE
    15-Jun-2011 06:48:29,25-Jun-2011 06:48:29
    25-Jun-2011 06:47:57,05-Jul-2011 06:47:57
    Edited by: Robert Chalton on 25-Jun-2011 07:01

  • Need to create a report to show values for a particular date range

    I have to create a report, out of which I need two columns : << Customer Value Variance and Churn Score Variance >> to show values only for a custom date range, which will be entered via a dashboard prompt.
    These generic date columns are not present and cannot be added. I have to make use of Pres variables
    What I have currently done is:
    1) Created a prompt with 2 different date columns and passing those values into variables vStartDate and vEndDate. (I don't actually need those 2 column which I have selelcted, but I have taken those so that I can prompt the values in calendar format and pass onto the variables)
    2) Created report with necessary columns, with 2 extra columns (hidden) as vStart Date Column and vEnd Date Column which take the values from the presentation variables defined in the prompt. I have created these columns as then I can reference these in the two required columns if necessary.
    I am already facing error in report after doing this and I am confused how to proceed. Any suggestions?
    Thanks.

    Yes, but it only has one generic Date column, no start date and end date. I can't use that twice in the prompt. Although I can specify it to be 'between', but I'm not sure I can pass values to both variables like that.
    Currently I have used Campaign Start Date and Campaign End Date to enter values in calender format to the variables.

  • Server Admin Doesn't show info for Software Update Service

    In server admin, under the settings and available updates, I see a list of available updates, but they are labelled with the hash code for the update, not the name, and the info panel doesn't show any information like it should. We have our corporate firewall configured to allow connections to the server apple uses for this service so that we can get the updates. Any suggestions?

    That option is only available after upgrading to iOS 5. It appears you have a 2nd generation unit, which can not be upgraded beyond iOS 4.2.1.

  • Query doesn't return results.

    Hi all,
    currently I face strange behavior and before I going to raise possible incident want to check if I haven't forgot something.
    Use case: I created for my custom BO OVS screen. By default there is used QueryByElements query. Unfortunately it's not possible search through OVS results. That way I tried to create SADL query where I specified basic search fields. When I replaced this search I couldn't get anymore list of BOs records. So I tried to create new query for my BO. I rebound all fields to this Overview node, bound query, but again no results in OVS, when I bounded back default QueryByElements results ar displayed.
    Has anyone faced similar behavior?
    Thanks,
    Uldis

    hi Uldism I am facing similar issue!
    did u get any solution?

Maybe you are looking for