Additoin of date with number

Hi all,
I am developing an application in java platform. In my project I have to add 15 days with current date. That means
if the today date is 10-04-2007, then the results should be 25-04-2007. Help me soon.

See the documentation for the Calendar class.
Kaj

Similar Messages

  • Issue with field data type NUMBER(22,5) while updating field data.

    Hi,
    I have a field with data type NUMBER(22,5).
    While inserting or updating field data it should take 17 digit and after decimal point 5 digit total 22 digit.
    I set 22 for maximumLength property of messageTextInput field.
    While updating field I am getting following problems,
    1) I provide the value as 1234567890123456789012 (22 digit) and click apply button.
    then I got error message as
    Error
    मैकेनाइजड दो पहिया/तीन पहिया वाहन - Value 1234567890123460000000 exceeds the maximum allowed value (NUMERIC (22, 5))
    2)then I insert 12345678901234567.1234 (17 digit before decimal point and 4 digit after decimal point and it didn't accept 5 digit after decimal point) and click apply button.
    It insert the value as 12345678901234600 (value changed after Apply)
    The I tried with simple SQL insert statement to insert data and it successfully insert 12345678901234567.12345 value.
    Any item property I missed here to set?
    Please suggest.
    Thanks & Regards,
    Sagarika

    hi
    according to
    " then I insert 12345678901234567.1234 (17 digit before decimal point and 4 digit after decimal point and it didn't accept 5 digit after decimal point) and click apply button.
    It insert the value as 12345678901234600 (value changed after Apply)"
    this statement ,it seems that it is definitely applying round or somthing like that function in the code before inserting value in the table("try with select round(12345678901234567.1234 ) from dual u will get the same result = 123456789012345600 ") ,
    bcz u r able to insert the same directely into the table using insert statement so kindely have look on the code if something like this is not happening there.try to check code in related EOimpl class
    try to to use debugging mode ,and the 23 char problem is related to maximum lenghth of text box make it 23 it will get resolved and u will be able to enter 17 digits with 5 digits after decimal point
    thanx pratap

  • Ho to Comapre with Number Data Type

    hi
    My reqt is to do validation in ValidateEntity Method.
    How to compare the with Number Data type:
    For ex: Number a = gatAbc();
    If(a>10)
    throw new oaExcption...
    But while comapring i got compiler Error
    Error(218,17): method >(oracle.jbo.domain.Number, int) not found in class abc.oracle.apps.per.irc.pqr.schema.server.XxabcEOImpl
    So plz tell me how to compare the integer value with Number data type
    Thanx

    Check with float. It will work definitely.
    float number = Float.parseFloat(HrsPerDay); //HrsPerDay is a String and I am converting it to float
    if(( number <= 0) || (number >= 21))
                            throw new OAAttrValException(OAAttrValException.TYP_VIEW_OBJECT,
                                              "xxCopyResourceVO1",
                                              rowi.getKey(),
                                              "NoOfCopies",
                                              rowi.getAttribute("NoOfCopies"),
                                              "PA",
                                              "xx_xx_COPY_POSITIVE_NUM");
                       }Here in this code i am also checking that the Hours cannot be less then 0 and greater than 20.
    Thanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Date() - Buggy behaviour working with Number() or uint()

    It took me half day to track down this, apparently it is a bug (I don't know if there is some obscure logic behind it).
    Date() behaves much differently when casted/created with the same amount as Number() or uint()
    Here is the output when tracing:
    new Date()
    =
    Wed Jun 13 20:12:43 GMT+0200 2012
    new Date().time
    =
    1339611163266
    Number(new Date())
    =
    1339611163266
    uint(new Date())
    =
    3876334210
    new Date(Number(1339610984911))
    =
    Wed Jun 13 20:09:44 GMT+0200 2012
    new Date(uint(1339610984911))
    =
    Sat Feb 14 21:42:35 GMT+0100 1970
    As you can see, converting a date to Number(new Date()) or uint(new Date()) gives a completely different result.
    Also, working with the same time amount, if new Date(Number(time)) or new Date(uint(time)) returns a completely different date.
    So, even though milliseconds from 1st jan 1970 are obviously an integer, AS3 treats it differently if casted to Number or uint.
    Is there a logic? To me it looks like a bug...
    namaste
    Filippo

    If you look up the different numeric classes you will see how they differ in their limits.  One problem you will probably run into someday ( I have a couple times) is when you use a uint as a counter in a loop that is counting backwards... when it should reach a -1, which it cannot do, it jumps to 4294967295, leaving you scratching your head wondering why the loop never ended or some other out of range error occurs.

  • How to clone data with in Table with dynamic 'n' number of columns

    Hi All,
    I've a table with syntax,
    create table Temp (id number primary key, name varchar2(10), partner varchar2(10), info varchar2(20));
    And with data like
    insert itno temp values (sequence.nextval, 'test', 'p1', 'info for p1');
    insert into temp values (sequence.nextval, 'test', 'p2', 'info for p2');
    And now, i need to clone the data in TEMP table of name 'test' for new name 'test1' and here is my script,
    insert into Temp  select sequence.nextval id, 'test1' name, partner, info from TEMP where name='test1';
    this query executed successfully and able to insert records.
    The PROBLEM is,
    if some new columns added in TEMP table, need to update this query.
    How to clone the data with in the table for *'n' number of columns and*
    some columns with dynamic data and remaining columns as source data.
    Thanks & Regards
    PavanPinnu.
    Edited by: pavankumargupta on Apr 30, 2009 10:37 AM

    Hi,
    Thanks for the quick reply.
    My Scenario, is we have a Game Details table. When ever some Game get cloned, we need to add new records in to that Table for the new Game.
    As, the id will be primary key, this should populate from a Sequence (in our system, we used this) and Game Name will be new Game Name. And data for other columns should be same as Parent Game.
    when ever business needs changes, there will be some addition of new columns in Table.
    And with the existing query,
    insert into Temp (id, name, partner, info) select sequence.nextval id, 'test1' name, partner, info from TEMP where name='test'_
    will successfully add new rows but new added columns will have empty data.
    so, is there any way to do this, i mean, some columns with sequence values and other columns with existing values.
    One way, we can do is, get ResultSet MetaData (i'm using Java), and parse the columns. prepare a query in required format.
    I'm looking for alternative ways in query format in SQL.
    Thanks & Regards
    PavanPinnu.
    Edited by: pavankumargupta on Apr 30, 2009 11:05 AM
    Edited by: pavankumargupta on Apr 30, 2009 11:05 AM

  • I have order number and order date with me want to down load adobe creative cloud can you advise how to go about it

    i have order number and order date with me want to down load abode creative cloud on my desktop pls can you advise me how to go about it pls

    Creative Cloud Help / Creative Cloud for desktop
    https://helpx.adobe.com/creative-cloud/help/creative-cloud-desktop.html
    Creative Cloud Help / Sign out, Sign in | Creative Cloud desktop app
    http://helpx.adobe.com/creative-cloud/kb/sign-in-out-creative-cloud-desktop-app.html
    Creative Cloud Help / Install, update, or uninstall apps
    http://helpx.adobe.com/creative-cloud/help/install-apps.html
    Installing Creative Cloud Apps
    http://tv.adobe.com/watch/cs6-creative-cloud-feature-tour-for-video/installing-desktop-app s-from-creative-cloud/

  • Counter KF with 1 & 0 and difference between data type NUMBER (DEC) and INTEGER (INT4)

    Hi,
    I need to create a counter kf which should populate 1 and 0 to this counter field. Please let me know is there any difference between data type
    NUMBER (DEC) and INTEGER (INT4).
    Please suggest.
    Thanks & Regards,
    Pavan kumar

    Hi Pavan,
    The basic difference between Number(DEC) and INT4 is its internal storage in system.
    For Number (DEC) - Value internally stored as packed number with 3 decimal places whereas INT 4 as 4 byte integer without decimal places.
    For counter KF, you can go for INT 4.
    Hope this helps.
    Thanks

  • "You can't compare a date with a number" in a formula that worked in Excel

    I opened in Numbers an invoice file which was created in Excel. Formula returns hours worked. It has an "if" condition for the date field. I am assuming that that is the reason I get this "You can’t compare a date with a number because their data types are different." What do I do?
    Formula reads =IF(SUM(A11)>0,(D11−C11),"") where A11 is a date and D11- C11 are times, ie 4PM and 5PM
    Message was edited by: iamzoran

    Jerrold Green1,
    I agree with your words about using Sum with a single cell [have no idea why the "creator" of the file did that]; same for the parentheses enclosing subtraction. Yet cleaning it up as you showed me [=IF(A11>0,D11−C11,"") ] I got the same comment
    "You can’t compare a date with a number because their data types are different."
    Makes me think that t quinn is on to something with his "think the issue is with the expression ">0". Could it be that >0 is the number referred to and <>"" and ISBLANK are not numbers?!
    z
    PS: I am so happy that I am able to use Spelling and Grammar Checker with Safari on these posts. I was born and raise in old Yugoslavia and I use the Checker with all my emails etc and its a life saver. hahaha

  • How to add date with month after convert number to month?

    How to add date with month after convert number to month?
    Month Date Result
    24 21/11/09 24*(21/11/09)
    I want to add both the column and result should be 21/11/11
    Thanks
    Nihar

    Hmm,
    Because, you are using YYYY for '09'.
    SQL> ed
    Wrote file afiedt.buf
      1* select to_char(to_date('10/01/09','DD/MM/RRRR'),'DD/MM/YYYY') from dual
    SQL> /
    TO_CHAR(TO
    10/01/2009
    SQL> ed
    Wrote file afiedt.buf
      1* select to_char(to_date('10/01/09','DD/MM/YYYY'),'DD/MM/YYYY') from dual
    SQL> /
    TO_CHAR(TO
    10/01/0009Or with Add_months
    SQL> ed
    Wrote file afiedt.buf
      1* select to_char(add_months(to_date('10/01/09','DD/MM/YYYY'),36),'DD/MM/YYYY') from dual
    SQL> /
    TO_CHAR(AD
    10/01/0012
    SQL> ed
    Wrote file afiedt.buf
      1* select to_char(add_months(to_date('10/01/09','DD/MM/RRRR'),36),'DD/MM/YYYY') from dual
    SQL> /
    TO_CHAR(AD
    10/01/2012-Arun

  • Excel data issue of string mixed with number or decimal

    I have an excel file (.xls) from the client. The file only has one column Name. For some reasons, a couple of data are number or decimal (see the following example).
    Name
    abc
    xyz
    123
    3.98
    When I tried to import data to the table (mssql 2008) (one column with nvarchar(255)), I got the error:
    The column status returned was: "The value violated the integrity constraints for the column.".
    I had to open the file and added ' before the number or decimal 
    Name
    abc
    xyz
    '123
    '3.98
    Although it worked this way, it is not a good way. Any good suggestions to do it without modifying the file? Thanks.
    A Fan of SSIS, SSRS and SSAS

    That may be because you didnt set IMEX = 1 
    You have to set it to enable Excel to correctly determine data for intermixed datatypes
    see
    http://visakhm.blogspot.in/2013/01/excel-issues-in-handling-intermixed-data.html
    http://blog.concentra.co.uk/2013/05/15/why-ssis-always-gets-excel-data-types-wrong-and-how-to-fix-it/
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Issue with the Data Type 'Number' in Business Objects

    Hi,
    I have an Object in the Universe where the Data Type of the Object is a number. This Column pertaining to this Object has certain values in the database out of which there is a 17 Digit Value which is 00000000031101165.
    Now, when trying to retreive the same value through Business Objects it is getting rounded off to 00000000031101200 automatically when trying to view in Webi and when trying to retreive the same in Designer/Deski, it displays as 0.000000003110116E+16.
    So, I would like to know if there is any other alternative in trying to retreive the Original Value that would not round off. Also, do we have any Limitation for the Data Type Number in Business Objects? The Version we are on is XI3.1.
    Note: There are no functions that are used on this Object at the Universe Level and would not like to use any functions here.

    What is the underlying database?
    It looks like the data is considered to have two decimals, but is rounded to zero decimals.
    Only you don't see the number formatting.
    Is this a BW query?
    Is this a calculated keyfigure?
    In the query you can specify the rounding you want and it is also possible to specify it on an infoobject level.
    Check those settings...
    Hope this helps,
    Marianne
    PS. Oh, and about the formatting, you can specify a default object format in the universe and override it on the final client (WebI, Crystal)

  • Open Hub: How-to doc "How to Extract data with Open Hub to a Logical File"

    Hi all,
    We are using open hub to download transaction files from infocubes to application server, and would like to have filename which is dynamic based period and year, i.e. period and year of the transaction data to be downloaded. 
    I understand we could use logical file for this purpose.  However we are not sure how to have the period and year to be dynamically derived in filename.
    I have read in sdn a number of posted messages on a similar topic and many have suggested a 'How-to' paper titled "How to Extract data with Open Hub to a Logical Filename".  However i could not seem to be able to get document from the link given. 
    Just wonder if anyone has the correct or latest link to the document, or would appreciate if you could share the document with all in sdn if you have a copy.
    Many thanks and best regards,
    Victoria

    Hi,
    After creating open hub press F1 in Application server file name text box from the help window there u Click on Maintain 'Client independent file names and file paths'  then u will be taken to the Implementation guide screen > click on Cross client maintanance of file name > create a logical file path by clicking on new entiries > after creating logical file path now go to Logical file name definition there give your Logical file , name , physical file (ur file name followed by month or year what ever is applicable (press f1 for more info)) , data format (ASC) , application area (BW) and logical path (choose from F4 selection which u have created first), now goto Assignment of  physical path to logical path > give syntax group >physical path is the path u gave at logical file name definition.
    however we have created a logical path file name to identify the file by sys date but ur requirement seems to be of dynamic date of tranaction data...may u can achieve this by creating a variable. U can see the help from F1 that would be of much help to u. All the above steps i have explained will help u create a dynamic logical file.
    hope this helps u to some extent.
    Regards

  • How can we get Dynamic columns and data with RTF Templates in BI Publisher

    How can we get Dynamic columns and data with RTf Templates.
    My requirement is :
    create table xxinv_item_pei_taginfo(item_id number,
    Organization_id number,
    item varchar2(4000),
    record_type varchar2(4000),
    record_value CLOB,
    State varchar2(4000));
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'USES','fever','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'HOW TO USE','one tablet daily','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'SIDE EFFECTS','XYZ','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'DRUG INTERACTION','ABC','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'OVERDOSE','Go and see doctor','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'NOTES','Take after meal','TX');
    select * from xxinv_item_pei_taginfo;
    Item id Org Id Item Record_type Record_value State
    493991     224     1265-D30     USES     fever     TX
    493991     224     1265-D30     HOW TO USE     one tablet daily     TX
    493991     224     1265-D30     SIDE EFFECTS     XYZ     TX
    493991     224     1265-D30     DRUG INTERACTION     ABC     TX
    493991     224     1265-D30     OVERDOSE      Go and see doctor     TX
    493991     224     1265-D30     NOTES     Take after meal     TX
    Above is my data
    I have to fetch the record_type from a lookup where I can have any of the record type, sometime USES, HOW TO USE, SIDE EFFECTS and sometimes some other set of record types
    In my report I have to get these record typpes as field name dynamically whichever is available in that lookup and record values against them.
    its a BI Publisher report.
    please suggest

    if you have data in db then you can create xml with needed structure
    and so you can create bip report
    do you have errors or .... ?

  • Successive dates with  last day of that month being added to succesive date

    Hi ,
    I have a piece of code that displays the succuessive dates from the given date to tilll date with a date interval of 30 days. My requirement goes some thing like this. since the given date is '26-nov-08' the next successive date should be the number of days in nov(30) added to '26-nov-08'. that will be around 26-dec-08. For this date it has to add the number of days in December(31) to '26-dec-08' and that turns out to be '26-jan-09'. and this must go on till date.
    In the below code i have used 30 for the interval of 30 days but the interval has to the last day of the successive date's month( for dec the interval has to 31 and for january the interval has to be 31 and for february 28)
    select to_date('26-nov-08', 'dd-mon-yy') + (level - 1) * 30
    from dual
    connect by level <= trunc((sysdate-to_date('26-nov-08', 'dd-mon-yy'))/30 )Please advice

    hi ,
    the query sent by you is correct and could it be in corporated for this query :
    SELECT TRUNC(inst_due_date) + (LEVEL-1 ) * (ilpa_term_type),iloan_code,LOAN_AMT,FEE_AMT,
    LOAN_DATE,LOAN_STATUS_ID
    FROM (
    SELECT inst_due_date,sm.iloan_code,LOAN_AMT,
    FEE_AMT,
    LOAN_DATE,
    LOAN_STATUS_ID,
    decode(sm.ilp_term_type, 26 ,14,24,15,12,(select to_number(to_char(last_day(inst_due_date),'dd')) from dual)) as ilpa_term_type
    FROM ST_IL_SCHEDULE sc,ST_IL_MASTER sm
    WHERE sc.iloan_code = sm.iloan_code
    AND sc.inst_num = (SELECT MAX(inst_num) FROM ST_IL_SCHEDULE b WHERE b.iloan_code = sc.iloan_code)
    AND sc.iloan_code =123456789)
    CONNECT BY LEVEL <= TRUNC((TRUNC(SYSDATE)-TRUNC(inst_due_date))/(ilpa_term_type) )
    Here we are using the decode concept if ilp_term_type = 26 then 14 but we need to implement the code of adding the number of days to that month in place of this code :
    select to_number(to_char(last_day(inst_due_date),'dd')) from dual:
    Please advice

  • Why does my phone use data with cellular data turned off?

    I have problems with my iPhone 5 using data on its own. It usually happens at night, with all the apps closed and plugged in to charge (should be connected to my wifi). Recently, I started turning off my cellular data any time I'm at home out of desperation to save my data. Last night, my phone used 6MB of data with my data off, plugged in. I use My Data Manager to track, it matches up with AT&T's record of my data usage, so I'm pretty sure the app is not wrong. I have the 200MB plan, so I have to be very careful and it's incredibly frustrating to wake up and find 6MB gone when cellular data was turned off. Does anyone know what's going on?  I haven't bothered calling Apple or AT&T, I never get anywhere with either one.

    I'm not familiar with My Data Manager but from the name I would think it would tell you what app or apps have used the data and that might help narrow down the problem. If it doesn't have that information, you can go to Settings > Cellular > Use Cellular Data For and that shows usage by each app and if you click on System Services in that list it will also give details of that usage. The numbers are since you last reset the statistics (bottom of that screen). With a little time and detective work you may be able to identify the cause.
    Also, there have been many discussions on various internet forums of AT&T (and other) reporting of the time of data usage not matching the actual time of the use. The usage numbers over a number of days for example are accurate but usage reported at 2AM may actually be a summary of some types of use that happened the previous day.

Maybe you are looking for