Hint on date problem

Hi all,
I'm stuck on the following problem:
SELECT ( TO_DATE ('13.06.2012 03:10:00', 'DD.MM.YYYY HH24:MI:SS')
- TO_DATE ('06.06.2012 23:15:00', 'DD.MM.YYYY HH24:MI:SS'))
FROM DUAL
Why the difference is 6.163 .. and not greater than 7 ? There are more than 7 days between, no ?
select TO_DATE ('06.06.2012 23:15:00', 'DD.MM.YYYY HH24:MI:SS') + 6,16319444444444 from dual
12.6.2012 23:15:00
And what is going on here ? If I add the number of days from the query above and add it to the smaller date from the above query the result is smaller that expected.
Could anyone please give me a hint and explain this behavior to me ?
Thank you very much in advance!
Michael

Hi Michael,
the difference is correct:
Maybe you should change the comma with decimal point in your statement.
See what is happening in my screen:
SELECT ( TO_DATE ('13.06.2012 03:10:00', 'DD.MM.YYYY HH24:MI:SS')
- TO_DATE ('06.06.2012 23:15:00', 'DD.MM.YYYY HH24:MI:SS'))
FROM DUAL;
      DIFF
6.16319444
select TO_DATE ('06.06.2012 23:15:00', 'DD.MM.YYYY HH24:MI:SS') + 6.16319444444444 from dual
13/06/2012 03:10:00
select TO_DATE ('06.06.2012 23:15:00', 'DD.MM.YYYY HH24:MI:SS') + 6,16319444444444 from dual
12/06/2012 23:15:00
{code}
Regards.
Al
Edited by: Alberto Faenza on May 31, 2012 11:57 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • (part 2 of 2): 3.x Dataflow migration test. Any hints on this problem?

    Hi Experts
    You may see this link for part 1 of this question for the full details if the continuation question below is not clear :
    (part 1 of 2): 3.x Dataflow migration test. Any hints on this problem?
    The eventual goal here is to migrate the 3.sx dataflow so as to use the transformations, etc
    4:
    Instruction: After successful activation of transfer rule Right Click on Data Source and say Migrate.
    i.e. I am still under InfoSource tree, I expanded transfer rule to see Data Source under itu2026
    R-clk & select Migrate, WITH EXPORT
    --finally got u201CDataSource 0PLANT_ATTR(E75CLNT800) was migratedu201D
    5:
    Instruction: To convert Update Rules to Transformation
    The instructions states u201Cu2026 Now Go to Info Provider and search for 3.x old Data Source . Right click on Update rules and say Create Transformation. ..u201D
    My issue:  Under InfoProvider tree, search for original datasource: 0Plant_Attr could not be found.
    I then performed a FIND and checked the box for Datasources 3.x  It gave no datasource from the source system(E75CLNT800) I am dealing with.
    BUT if I ignore the instruction and do a FIND for Datasources (without the 3.x), I find it for the right 0plant_Attr for my source system
    The problem is that it still did not show the Update rule under itu2026
    --I then went to Datasource tree, Logistics, u2026followed path to 0palnt_Attr datasource and identified the Update Rule
    but it does not have an option for u201CAdditional Functionsu201D, to u201CCreate transformationu201D
    I am therefore stuck on page 9 on the above link providing me the instructions. Any hints?
    6.
    I searched under the InfoProvider tree, found 0Plant but there were multiple Transfer rules BUT none of them showed for E75CLNT800 that I was interested.
    I saw Transfer Rules and Update rules for other source systems on the IDES e.g. E69CLNT190 with the datasource etc. What happened to mine?

    Hi,
    Great, I followed the comments on the board and restored the datasource to 3.x datasource. Then contrary to the instructions in the link I was following, I migrated Transfer rule, Update rules before the datasource (0PLANT_ATTR) migration.
    I am happy everything is fine but I encountered some issues, which I would like your comments on:
    1.
    I have access to the ECC E75CLNT800  and I saw that some developers were also loading to the same 0Plant attribute with datasource e.g. 0WS_TAROBJ_ATTR from other systems e.g. E69CLNT190
    If I were to test this second option as a BI Consultant, do I need the involvement of Basis to establish a connection from BI to E69CLNT190 or, am I as a BI consultant expected to do that myself?
    2.
    During the migration of Transfer Rule it failed to activate with error:
    u201CRule (target: 0GN_R3_SSY, group: 01 Standard Group): Syntax error in routineu201D
    Later, I u201CDelete Ruleu201D for 0GN_R3_SSY (Source Systems for R3 Entity), before I was able to activate.
    What is this about and what is the implication for deleting this rule? There was nothing I could map it to and was not sure why the rule was "Routine" so I changed to "No Transformation"
    3.
    How come that under the InfoProvider treeu2026 in the data flow for 0Plant_Attr, I donu2019t have the DTP I created under the Datasource treeu2026. Shouldnu2019t it appear at both places?
    --I executed the DTP created under the Datasource tree and data went from PSA to InfoObject (0Plant) alright.
    Thanks..
    Edited by: AmandaBaah on Aug 11, 2011 5:43 PM

  • Help needed with missing data problem in CRVS2010

    We recently upgraded the reporting engine in our product to use Crystal Reports for Visual Studio 2010 (previously engine was CR9). Our quote report, which has numerous subreports and lots of conditional formatting, started losing data when a quote took more than a single page to be printed. We knew the SQL results included the data, but the report was not printing those lines at all or sometimes printing a partial line. In addition, the running total on the report would exclude the lines that were being missed on the next page. In one example submitted by a customer, 3 lines were skipped between pages.
    I think I have identified two potential issues that document the possibility of data not being included in the report.
    The first potential issue is an issue with the "suppress blank section" option being checked. This issue is supposedly fixed with ADAPT01483793, being released someday with service pack 2 for CRVS2010.
    The second potential issue is using shared variables. This issue is supposedly fixed with ADAPT01484308, also targeted for SP2.
    Our quote report does not explicitly use shared variables with any of the subreports, but it does have several subreports, each in its own section that has the "supress blank section" option checked. We have other reports that use this feature, as well, and they are not exhibiting the problem.
    One different thing about the quote report is that it has a section with multiple suppression options selected. The section has a conditional suppression formula, which controls whether the section is included at all within the report. The section also has the suppress blank section option selected. There are multiple fields within the report that are each conditionally suppressed. In theory, the section's suppress formula could evaluate to true, yet all of the fields within the section are suppressed (due to null values), and then the "suppress blank section" option would kick in.
    The missing data only seems to happen when the section is not being suppressed, and at least one of the fields is being included in the report. If I clear the "suppress blank section" check box, and change the section formula to also include the rules applied to the fields in the section, the missing data problem seems to be resolved.
    Is this related to ADAPT01483793? Will it be fixed in service pack 2?
    If more details are needed, I would be happy to provide a sample report with stored data.

    Hi Don,
    Have a look at the Record Selection formula in CR Designer ( stand alone ) and when exported to RPT format opening that report in the Designer also. 
    There's been a few issues with => logic in the record selection formula. It could be you are running into this problem. Look for NOT inserted into your selection formula.
    Oh and SP2 is coming out shortly so it may resolve the issue. But if you want you could purchase a support, or if you have a support contract then create a case in SMP and get a rep to work with you to debug the issue.
    If you have not try the Trial Version of CR 2011, put it on a VM-ware image or Test PC so you don't corrupt anything for production and have a look at and test it in that designer also. If you purchase a case and it is a bug then you'll get a credit back for the case.
    Don
    Edited by: Don Williams on Oct 26, 2011 7:40 AM

  • Clearing of Balance in GR/IR clearing account due to date problem

    >Hi to All,
    >The scenario is like this :-
    >The client is making back dated entries for quarter between 01.04.2008 to 30.06.2008 in SAP in July 2008 as the system is getting implemented now. He wants to regularise all the transactions in SAP from 01/04/2008.
    >The users entering the data were new and hence though the miro and payment entries were made by F&A in back date. The Purchase Orders and the GRs were prepared in the current date of July 2008.
    >Because of this date problem the GR/IR clearing account is having balance in it, which should have been clear after the processing of the miro document.
    >The documents were handed over to f&a after preparation of GR in the systems for Invoice processing through MIRO.
    >Can anyone plz give a solution to clear the balance GR/IR clearing account.
    >Thanks in advance.
    >Ashutosh M Joglekar.

    Hi Muthuraman,
    No need to clear any thing for PO pending items.
    Regards
    Gitesh

  • My macbook pro recently got swiped and I lost all my data, problem is, just before it was swiped I set up my new iphone 5 which transferred all my photos and music over which is no longer on the computer. What will happen to my phone if I plug it in?

    My macbook pro recently got swiped and I lost all my data, problem is, just before it was swiped I set up my new iphone 5 which transferred all my photos and music over which is no longer on the computer. What will happen to my phone if I plug it in?

    I never used icloud before so there is no data to back up from. I just spoke  to the apple store and they said that if I do plug it in, all the data will be swiped....is there a program I can use to transfer my data from my phone to computer without loosing it all ???
    Renee

  • Will apple next update to help fix the location following data problems will the ipod touch 2g be included ?

    will apple next update to help fix the location following data problems will the ipod touch 2g be included ?

    Chances are the 2g itouch will not be included in the update. Also no one yet knows if it will be fixed in the next firmware but apple has said they know of this bug.

  • A Full DTP is converted into delta DTP and facing some data problem

    Recently Full DTP(DSO to DSO) is converted into delta DTP , we are facing some data problem in first request.Some data in D2 are not updated properly after just converted in full to delta. Please let me know if you have any idea.
    Example :
    DSO : D1
    DSO : D2
    Previously FULL DTP D1->D2
    Now Delta DTP D1->D2

    Hi,
    First time run of delta DTP will extract all the records from the source...
    As u have already run the Full load and followed by delta,i guess u can use direct change log option...
    rgds,

  • Parsing Date Problem

    I have date problem that I am finding hard to resolve. Please
    suggest me what I could do.
    I want to parse String Date values of formats like "19 Jun 2003" and
    "19/06/2003" to a Date object.
    Can I Do it.
    Thanking in Advance.

    Sure. See SimpleDateFormat#parse.
    Kind regards,
      Levi

  • [JHS10.1.3] Date problem

    Running into a date problem for a forms migration.
    I have a date field in the database, normal date field.
    The users want to be able to search on partial dates.
    So adding a between on this field will only generate two date selectors, which is not what they want.
    The format is like a year field, week field, day field.
    I could modify the query to return three extra numeric fields which convert the date to the right format ('yyyy', 'wi', 'dd' ) and then to number and generatie 3 between fields for this.
    This will generate the right layout, 6 input fields for a year from/to week from/to day from/to
    But the query will be like (year between x and x) and (week between x and x) and day (between x and x)
    This will not produce the right results.
    What is possible is a string manipulation of the whereclase in the method getViewCriteriaClause()
    And see if any/all of the fields are filled and build the query there, but this is not a 'clean' solution.
    Any idea on how I can solve this? Basicly a date field in the database, user wants to search that date field on year/week/day between year/week/day or a partial of that.
    This is the way it used to be in the forms application so I really want to give the same functionality with ADF.
    Anton

    Not sure if I completely understand what you said, but this is what I did ( it seems to work )
    All my viewobjects extends a new superviewobjectimp, this class has just 2 setters and getters, one for the datefield I want to search on and one for the partial name I gave the three attributes (<fixed name>Year <fixed name>Week <fixed name>Day).
    In the advancedSearch, in the loop trough the attributes I cast the viewobject to this superviewobjectimp. I can now check if the attribute contains the partial name. If this is the case I build my own string and add it to the viewCriteriaMap.
    One odd thing I found here is that it refuses to let me add a string like
    between to_date( '<startdate>', 'yyyy-mm-dd' ) and to_date( '<enddate>', 'yyyy-mm-dd' )Because if I do this, for some reason the attribute name will be wrapped in a to_char!
    If I just leave:
    between '<startdate>' and '<enddate>'It works, but I dont feel really safe about that, I would rather use the datecast to be sure.
    Any idea how this can be done?
    I also used the java Calendar class to transform a yyyy-iw-d to a yyyy-mm-dd because it seems I cant use 'iw' in a to_date(....). This also solved a problem with partial dates, java will autocomplete them for me.
    In other words if I only supply the year 2005 to 2006 it will auto search from 2005-1-1 - 2006-1-1, same for weeks.
    I have a lot of viewobjects which will require this, I'm trying to make it as solid as I can.
    Any suggestions?
    Anton

  • I have a strange 3g data problem.

    I have a strange 3g data problem.  At home I have zero 3G connectivity even though all bars are showing and says "3G" and wifi is "Off" ... unless I am on the phone and then magically the 3G data connection works perfectly!!  Does anyone have any idea what is happening?  Also when I bring my phone to my dad's or my friends house the problem disappears!! Is this a hardware or a AT&T network problem? os is 4.3.3
    Also called ATT and they said there was no problem with the network and that it was a hardware issue.  Also restored the phone several times but the problem did not go away.

    OK, no trouble shooting. The first thing I'd attempt is restarting in Safe Mode. If you still don't have luck try doing both a SMC and PRAM reset, it wouldn't hurt to do the SMC reset a couple of times. If still no luck let us know.
    SMC RESET
    Shut down the computer.
    Unplug the computer's power cord and all peripherals.
    Press and hold the power button for 5 seconds.
    Release the power button.
    Attach the computers power cable.
    Press the power button to turn on the computer.
    PRAM RESET
    Shut down the computer.
    Locate the following keys on the keyboard: Command, Option, P, and R. You will need to hold these keys down simultaneously in step 4.
    Turn on the computer.
    Press and hold the Command-Option-P-R keys. You must press this key combination before the gray screen appears.
    Hold the keys down until the computer restarts and you hear the startup sound for the second time.
    Release the keys.

  • Interpreting error message; insight into data problems?

    I own a 8310 on AT&T running OS 4.5.011.  I have been having intermittent data problems that have gotten worse over the last week; e.g., the connection box autonomously becomes unchecked, the browser cannot find a connection, data randomly goes form GSM to edge and back, Vlingo cannot find its server.
    AT&T Service suggested a "Master Reset" and I have backed up my data with BB Desktop Mgr. as a first step.  I got the following error message:
    "Uncaught Exception:Application net_rim_bb_app(53) is not responding; process terminated"
    Please help me 1) translate and 2) does that suggest a source of my problems?
    Regards
    Rob 

    You need to enclose carData[0],carData[1] etc in single quotes, if they are String(s). Otherwise you can use PreparedStatement.
    PreparedStatement ps = con.prepareStatement("Insert into car values(22 questions marks)");
    ps.setInt(1,temp);
    for(int i=0;i<21;i++) ps.setString(i+2,carData[ i ]);
    int count=ps.executeUpdate();
    Sudha

  • Serious date problem

    I am using Form 6i.
    I am getting serious date problem.
    The MM/DD/RRRR is converted to DD/MM/RRRR and the result is false record.
    How to avoid this serious problem. I am very shocked to find this error after few hours of brainstorming session.
    I am using following query to create cursor
    [htm]     CURSOR cur_first IS SELECT      a.item_code,
         b.item_description,
         a.lot_no,
         d.name model,
         c.vendname,
         date_of_purchase,
         warrenty_upto,
         quentaty,
         rate,
         pc_type,
         TO_DATE(decode(warrenty_flag_yn,
                        'W', TO_DATE(warrenty_upto),
                        'A', TO_DATE('31-MAR-'||v_year),
                        'X', TO_DATE('31-MAR-'||v_year)),'DD-MM-RR') AS amc_date
         FROM      pc_item_procurement_history a,
                        pc_item_master b,
                        pc_vendor_master c,
                        pc_model_master d
         WHERE a.item_code= b.item_code
         AND a.modelcode=d.modelcode
         AND a.vendcode=c.vendcode
         AND (b.item_description LIKE '%'||:blk_main.item_name||'%' OR :blk_main.item_name IS NULL)
         AND (TO_DATE(a.warrenty_upto,'DD-MM-RR') <= :blk_main.to_date OR :blk_main.to_date IS NULL)
         AND warrenty_flag_yn='W'
         ORDER BY b.item_description;
    /pre][html]
    Thanks and regards,
    Vikas                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    I've just noticed something in the where clause that makes all this a lot easier.
         CURSOR cur_first IS SELECT      a.item_code,
         b.item_description,
         a.lot_no,
         d.name model,
         c.vendname,
         date_of_purchase,
         warrenty_upto,
         quentaty,
         rate,
         pc_type,
         warrenty_upto AS amc_date
         FROM      pc_item_procurement_history a,
                        pc_item_master b,
                        pc_vendor_master c,
                        pc_model_master d
         WHERE a.item_code= b.item_code
         AND a.modelcode=d.modelcode
         AND a.vendcode=c.vendcode
         AND (b.item_description LIKE '%'||:blk_main.item_name||'%' OR :blk_main.item_name IS NULL)
         AND (a.warrenty_upto <= :blk_main.to_date OR :blk_main.to_date IS NULL)
         AND warrenty_flag_yn='W'
         ORDER BY b.item_description;BUT...
    Is Warrenty_upto really a date column? You say it is "stored as m/d/yyyy" but a date is not stored with a format in oracle - it's just a date and the format is applied when you retrieve the data.
    In sql*plus if you Describe the table you can see the column type. If you select the data you only ever get a string.
    I'm assuming :blk_main.to_date is a date.

  • HELP!!!! DATE PROBLEM

    I have a procedure like this. But even though the value of both mdate and mlistdate_cur.leave_from values are the same , the if condition is not validated. Please help!!!!
    PROCEDURE leave_check ( MDATE IN DATE, PDATE OUT DATE) IS
    testflag char(1) := 'N';
    cursor listdate_cur is
    select leave_from,leave_to,type_of_leave from vacation_list;
    BEGIN
         for mlistdate_Cur in listdate_cur loop
         if (mdate = trunc(mlistdate_cur.leave_from) ) then
              pdate := mlistdate_cur.leave_to + 15;
                             testflag := 'Y';
         elsif ( mdate >= trunc(mlistdate_cur.leave_from)) and (mdate <= trunc(mlistdate_cur.leave_to)) then
                   pdate := mlistdate_cur.leave_to + 15;
                             testflag := 'Y';
         end if;
    end loop;
    if testflag = 'N' then
              pdate := mdate;
    end if;
    END;

    Hello
    Welcome to the club of Venezuelan Mac owners with date problems
    There's a thread here about the same problem
    http://discussions.apple.com/message.jspa?messageID=6399776#6399776
    Please add your message to that thread, so there's a common record of this problem
    Omar Vasquez

  • Refresh package with 'From-Date' Problem

    Hi All,
    I just ran into configuring the Analyze and Specify 'From-Date' problem fro refreshing package.   I've completed the normal package with the starting date 8/30/2008.  Now I am trying to go back and copy and select from 7/30/2008 for the new run during that posting period.  I am not if this is possible but it doesn't allow me to choose any of the option.  If I choose Analyse and deine new 'From-Date' when the screen popup, then choose 7/30, the date is not transfer to the Chosen From Date field at all, and execute.  The system will display he error with  "Evaluation failed. Required customising data no available".  Basically, it doesn't allow me to choose any date.
    Do any of you experiencing the same problem.  Or did I miss any step from the first run?
    Thanks,
    Tai

    Hi Tai,
    Implement the note 1180500 - Activity TD01P_FROM_RFH runs into error in a refresh package.
    Regards,
    Santosh

  • Problem with control hints and date formatting

    Hi,
    I have a Date attribute with a control hint 'dd.MM.yyyy' in my EO. When the user browse through the data all date values have 4 digits. But when a lazy user changes a date value to e.g. 12.12.04, the new value is stored as 12.12.0004. This is correct Java behavior.
    When I change my control hint to 'dd.MM.yy', the lazy user can enter 12.12.04, which is stored as 12.12.2004. Great, but the user want to see a 4-digit year.
    My problem is that the customer wants to enter only 2 digits for the year but the application must render the date with 4 digits.
    How can I configure ADF to solve my problem?
    Does Domains help? Is there a general switch in Java or ADF witch converts 12.12.04 to 12.12.2004?
    Any hints are welcome.
    Thanks,
    Markus

    For your 2nd problem, you can create a field of type string (create a data type which has domain STRING), which has unlimited lenght. However, you can only have 3 of these fields in your table.
    I think this will solve the # problem too.
    Regards,
    Valter Oliveira.

Maybe you are looking for

  • Additional AGate process

    Hi, Kindly advise on the queries to add a additional AGate node. We have 4GB of Physical Memory and our process is not completely utilised but the AGate stops responding when the MaxThreads goes to 0. So we have analysed and decided to add a addition

  • Adding invitees to iCal event takes forever...

    Since I upgraded to Snow Leopard, adding an invitee to a calendar event takes 30-40 seconds. I start typing a name, get the spinning beachball, and thirty seconds later get a list of matching contacts from Address Book. Thirty or forty seconds is the

  • Where to find it...

    Hi guys, I read about all these ppl having probs with the new iTunes 7. Well, here's my prob: I can't even download it! If I go to the downloadsite ont the Apple homepage, nothing happens. It just says iTunes 7 is here, download it now! - but no butt

  • Packaging error 2 (The media contains invalid NALU length)

    Hi, I am trying to publish live stream from Adobe Flash client that can be viewed on iOS device.  One known issue is that the Flash client does not support AAC audio encoder when it publishes a stream, but AAC is required for iOS viewing.  Thus I am

  • API for loading Bank account details for the Customer

    Hi, Can anyone tell me what is the API that needs to be used for loading bank account information for the Customer? Thanks GM