Date manipulation(urgent)

In my string variable
foreg.
strDate1 = "03/14/2001";
strDate2 = "03/14/2002";
first i have to add 15 days to my strdate1 and then i have to compare these dates stored in two sring objects
.I tried to do this converting these string objects to date and then using the methods but iam getting the warning that these methods are deprecated .
how can i do this.

Use instances of the GregorianCalendar class.
You have methods for rolling and comparing time.

Similar Messages

  • Need Date manipulation in BI Publisher report template

    Hi All,
    I need date manipulation in BI Publisher report template for e.g sysdate+4 this means i need 4 days after todays sysdate.
    That menas if today date(sysdate) is 09/01/2008 then i need (sysdate+4) i.e 13/01/2008.
    Please help me.
    Thanks
    Edited by: user562690 on Jan 9, 2009 3:21 PM

    Hi M14,
    I have doubt on similar type.I have AgreementStartDate as
    <AgreementStartDate>12/03/2008 07:24:10</AgreementStartDate> in XML format.
    I am not able to apply same formula for thsi date format in similar manipulation.
    Please help me.
    TIA
    skr

  • Best Practice for Package Implementation of Data Manipulation

    Hi,
    Would like to ask which is better implementation for data manipulation (insert, update, delete) stored procedure for a single table.
    To create a single procedure with input parameter for the action such as 1 for insert, 2 for update and so on
    or
    to create separate procedures for each like procedure pInsData for insert, pUpdData for update...

    Hi,
    Whenever you create a procedure it resides as a seperate object in database.
    In my opinion its better to create a single procedure which takes care of all DML concern to a table, rather than creating different procedures for each DML.
    If your number of DML are more and interrelated then its better to create a package and put all related DML procedures in the package concern to one transaction or table. This is because whenever you will call a package entire package will be placed in the memory for a particular session. So if you create different procedures for DML then you need to call the procedures each time you want it to be executed.
    Twinkle

  • What class to use for date manipulation

    To get some experience in using Java, I would like to write a small application. I want users to enter their names and birth dates, and then I want to present the number of days they have been walking around on this planet. Furthermore, I want to present the dates when the number of days will be a nice quantity ("On February 1st, 2007 your day age will be 10.000 days", or something like that).
    To calculate the number of days, I have to do some date manipulation. Now I am wondering what date-related classes I should use. Of course, there is Date, but in the API specification, I see 'deprecated' for a lot of methods. Does this mean that the use of Date is discouraged, and/or should be avoided?
    Then, there is a class Calendar, but that's an abstract class. Thus, I cannot create a Calendar object when a user has entered his birth date (in a Swing JTextField).
    The use of GregorianCalendar seems a bit far-fetched to me, but maybe I am wrong.
    In short, when a user has entered his birth date, I want to store it in some date-like object, and I want to be able to do some arithmetic based on that object.
    Can anyone give me some clues?
    Ewout

    > The use of GregorianCalendar seems a bit far-fetched
    to me, but maybe I am wrong.
    Yes, that's the way to go.

  • How to solve "error occurred in the data manipulation engine"? 64bit Windows 7

    Hi all
    I'm having quite a testing time here trying to use the new SAP PA 2.0. After installation the software launches, the Automated Analytics seems to work fine but not the Expert Analytics.
    Steps as follows:
    Launch PA
    Choose and launch Expert Analytics
    Choose Try with Samples
    Open the Dairy Wholesaler file
    Error: An error occurred in the data manipulation engine. Check the manipulation parameters. (HDB 01001)
    I also get this same error when I try to create my own New Dataset.
    I’m on 64bit Windows 7 Pro
    Is there anyone who knows how to solve this problem. I've searched the SCN and online and have tried the following:
    1. Uninstall and re-install. Doesn't help
    2. Uninstall and delete old lumira related folders on the C drive e.g. the SAPPA and SAPVI folders on the C drive, then re-install.
    Much appreciated if anyone could shed some light on this. I've previously had Lumira working with no issues. I've since uninstalled Lumira, Predictive Analytics, and Infinite Insights (as PA 2.0 is all of this combined)
    Regards
    Ria

    In case anyone has the same problem, I found the the following helpful (taken from Error after upgrading to 1.18 ). The solution is for Lumira however its the same steps for PA2
    1.  You might want to try a ‘clean’ uninstall / reinstall . After uninstalling, try deleting these folders:
    C:\Users\Public\sapvi
    C:\Users\<user>\AppData\Local\SAP\Lumira
    C:\Users\<user>\AppData\Local\Temp\sapvi
    In this step I searched for every SAP related file in AppData in the Public, User, and my own username folder under \Users\
    2.  Next, to launch the application, explicitly click "Run as Administrator" on the install file

  • What is data manipulation

    dear experts,
    i have got a requirement saying ABAP developers needed ..in that they mentioned
    Data manipulation and Scripting...
    i am assuming data manipulation as inserting, modifying ie. doing modifications in the database
    and not sure of the scripting...
    what do they really mean?
    thanks in advance.

    LSMW Scripting tools  - the referrs to data transfer or conversion from legacy system to SAP.  LSMW is a tool within R/3 that we use to do this.
    Customizations - This could be modifying standard SAP programs to conform to the business requirement and/or writing custom programs to fill the gap
    Data Conversion -  This is converting data from 3rd party or legacy systems to SAP database.
    Data Manipulation - Again, not sure, but it could be anything related to data.
    Scripting -  I think this may refer to the sapscript forms tool that I mentioned before.
    Really all of them except for the first are a little ambiguous.
    Regards,
    RIch Heilman

  • Data Manipulation using Cubes

    Dear Experts
    My question: are BI cubes all about quering and reports? can perform data manipulation process, e.g. payroll, to the cube OLAP database directly, something like stored procedures in ordinary relational databases?????
    thanks in advance

    Hi Khidir,
    According to your description, you want to know if we can manipulation data in SQL Server Analysis Services database, right.
    As Reeves said, SSAS provide Writeback feature which is used for budgeting, forecasting or any other scenario in which you need enter data into your structure. Please refer to the link below to wee how to enable/disable writeback feature for a cube.
    http://msdn.microsoft.com/en-us/library/ms178845.aspx
    However, OLAP designed for storing and retrieving large amounts of data to be used for ad-hoc reporting and analytics. And helps users to make more informed business decisions by enabling them to analyze information accumulated during a company’s day to
    day operations.
    http://www.informit.com/articles/article.aspx?p=1313996
    http://www.nenit.net/pages/ssas.aspx
    Hope this helps.
    Regards,
    Charlie Liao
    TechNet Community Support

  • DATA manipulation #2

    hi everyone,
              my name is zhi. I have asked for help in privous post about data manipulation. I am still waiting for the other respond. however, i need to finish my porject within a week. So I really hope someone can help me to get the correct responds from the sensor.
    i am geting the reading from the micro-epsilon sensor , ILD-1800. however, i cannot get a proper reading. i know this is because i am no manipulating the data correctly. Since this is my first time doing it. i have no idea which way is the correct way to.  Plus, no one i our school know how to do data manipulation in Labview. please help.
    I have an screenshot , VI, and manufacture manual (please take a look at page 31) in attachment.
    thanks in advance.
    zhi
    Attachments:
    ILD1800_X9751053-C07.pdf ‏1057 KB
    trial2.vi ‏59 KB
    shot1.JPG ‏180 KB

    Hi Zhi,
    I'm guessing you're looking for the Join Numbers and the Logical Shift. 
    I'll post some screenshots that show where they are.
    Message Edited by pallen on 04-24-2008 03:46 PM
    Patrick Allen
    Attachments:
    join numbers.jpg ‏54 KB
    Logical Shift.jpg ‏53 KB

  • Duplicate records found while loading master data(very urgent)

    Hi all,
    One infopackage in the process chain failed while laoding the master data(full update).Its showing the following error-->duplicate record found ..1 record used in /BI0/PTCTQUERY and the same record occured in /BI0/PTCTQUERY tables.
    can anyone give me the solution...its very urgent...
    Thanks & Regards,
    Manjula

    Hi
    You can see the check box in the Processing tab page. Make a tick mark for the check box Ignore Duplicate Data Records indicator . When multiple data records that have the same key are transferred, the last data record in the request is updated to BI. Any other data records in the request with the same key are ignored.
    Help says that:
    To maintain consistency, ignoring duplicate data records is only possible if the data is updated serially. A serial update is when data is first updated into the PSA then, after it has been successfully written to the PSA, it is updated into the master data or text tables of the InfoObject.
    If a DataSource transfers potentially duplicate data records or if you manually set the Ignore Duplicate Data Records indicator, the PSA Only update type is automatically selected in the scheduler.
    hope it clears ur doubt, otherwise let me know.
    Regards
    Kiran

  • Problem in Uploading Excel Data ! - Urgent

    Dear Experts,
    I am uploading excel data using FM 'TEXT_CONVERT_XLS_TO_SAP' , its directly convert data and store in internal table same as in excel sheet(row , column wise).
    But the problem is , one of the column having description more then 500 characters. so while uploding excel to itab its truncating the text and only uploding 255 characters.
    Is there any other way , so that i can upload more then 500 characters long text. Also i have tried 'ALSM_EXCEL_TO_INTERNAL_TABLE' FM , it was also not working.
    Please Help me , its Urgent.
    Points will be rewared.
    Thanks & Regards,

    Hi,
    Please use FM 'GUI_UPLOAD'.
    types: begin of ttab,
           rec(1000) type c,
           end of ttab.
    types: begin of tdat,
           fld1(10) type c,
           fld2(10) type c,
           fld3(10) type c,
           end of tdat.
    data: itab type table of ttab with header line.
    data: idat type table of tdat with header line.
    data: file_str type string.
    parameters: p_file type localfile.
    at selection-screen on value-request for p_file.
      call function 'KD_GET_FILENAME_ON_F4'
           exporting
                static    = 'X'
           changing
                file_name = p_file.
    start-of-selection.
      file_str = p_file.
      call function 'GUI_UPLOAD'
           exporting
                filename                = file_str
                filetype                = 'ASC'
           tables
                data_tab                = itab
           exceptions
                file_open_error         = 1
                file_read_error         = 2
                no_batch                = 3
                gui_refuse_filetransfer = 4
                invalid_type            = 5
                no_authority            = 6
                unknown_error           = 7
                bad_data_format         = 8
                header_not_allowed      = 9
                separator_not_allowed   = 10
                header_too_long         = 11
                unknown_dp_error        = 12
                access_denied           = 13
                dp_out_of_memory        = 14
                disk_full               = 15
                dp_timeout              = 16
                others                  = 17.
    Best regards,
    Prashant

  • SQL Loader Oracle 10g problem in upload date with time data -- Very urgent.

    Hi
    I am trying to upload data using SQL loader. There are three columns in the table
    defined as DATE. When I tried upload a data like this '2007-02-15 15:10:20', it is not loading time part. The date stored as 02/15/2008' only. There is not time on that. I tried with many different format nothing work. Can please help me ?
    I have also tried with to_date --> to_timestamp it did not work.
    The application is going to be in production, I cannot change DATE to TIME STAMP. This is very urgent.
    LASTWRITTEN "decode(:LASTWRITTEN,'null',Null, to_date(:LASTWRITTEN,'YYYY-MM-DD HH24:Mi:SS'))",
    CREATEDON "decode(:CREATEDON,'null',Null, to_date(:CREATEDON,'YYYY-MM-DD HH24:Mi:SS'))",
    LASTUPDATEDON(21) "decode(:LASTUPDATEDON,'null',Null, to_date(:LASTUPDATEDON(21),'DD/MM/YYYY HH24:MI:SS'))"

    Your problem is most likely in decode - the return type in your expression will be character based on first search value ('null'), so it will be implicitly converted to character and then again implicitly converted to date by loading into date column. At some of this conversions you probably are loosing your time part. You can try instead use cast:
    SQL> desc t
    Name                                      Null?    Type
    LASTWRITTEN                                        DATE
    CREATEDON                                          DATE
    LASTUPDATEDON                                      DATE
    SQL> select * from t;
    no rows selected
    SQL> !cat t.ctl
    LOAD DATA
    INFILE *
    INTO TABLE T
    TRUNCATE
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
    LASTWRITTEN
    "decode(:LASTWRITTEN,'null',cast(Null as date),
      to_date(:LASTWRITTEN,'YYYY-MM-DD HH24:MI:SS'))",
    CREATEDON
    "decode(:CREATEDON,'null',cast(Null as date),
      to_date(:CREATEDON,'YYYY-MM-DD HH24:MI:SS'))",
    LASTUPDATEDON
    "decode(:LASTUPDATEDON,'null',cast(Null as date),
      to_date(:LASTUPDATEDON,'DD/MM/YYYY HH24:MI:SS'))"
    BEGINDATA
    2007-02-15 15:10:20,null,null
    null,2007-02-15 15:10:20,null
    null,null,15/02/2007 15:10:20
    SQL> !sqlldr userid=scott/tiger control=t.ctl log=t.log
    SQL*Loader: Release 10.2.0.3.0 - Production on Fri Feb 29 00:20:07 2008
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 3
    SQL> select * from t;
    LASTWRITTEN         CREATEDON           LASTUPDATEDON
    15.02.2007 15:10:20
                        15.02.2007 15:10:20
                                            15.02.2007 15:10:20Best regards
    Maxim

  • Row data manipulation in WD SALV_WD_TABLE

    Dear Gurus,
    I have a requirement in which i am using the standard WD component SALV_WD_TABLE in my custom WD component. Here i need to disable the checkbox in the first column based on a certain vallue in another column. Ex: I have the ALV displaying check box as first column followed by Purchase Order details like PO number, status, cost center etc. If the status has the value "Ordered" the checkbox should be displayed.
    I tried to set the check box with method set_read_only(abap_true). But this disables check boxes on all rows. How do i do this conditionally. I found threads to do something for all rows in a column like setting a particular colour.
    Regards,
    Manidipa

    Hi
    Take one attribute READONLY type String
    Take antoher internal table and move the contents of internal table to another to do manipulation and last bind the copied internal table.
    method WDDOINIT .
      data : lo_nd_spfli_node TYPE REF TO if_wd_context_node,
             lo_el_spfli_noed TYPE REF TO if_wd_context_element,
             lt_sflight TYPE if_main=>elements_spfli_node,
             lt_final TYPE if_main=>elements_spfli_node,
             ls_final TYPE if_main=>element_spfli_node,
             ls_flight TYPE if_main=>element_spfli_node.
          lo_nd_spfli_node = wd_context->get_child_node( 'SPFLI_NODE' ).
    SELECT * FROM
      SFLIGHT INTO CORRESPONDING FIELDS OF
      TABLE LT_SFLIGHT UP TO 60 ROWS.
      LOOP at lt_sflight into ls_flight.
        MOVE ls_flight to ls_final.
        if ls_final-carrid EQ 'AA'.
            ls_final-readonly = abap_FALSE.
        ELSE.
           ls_final-readonly = ' '.
        ENDIF.
        APPEND ls_final to lt_final.
      lo_nd_spfli_node->bind_table( lt_final ).
      ENDLOOP.
      DATA: l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
      l_ref_cmp_usage = wd_this->wd_cpuse_alv( ).
      IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
        l_ref_cmp_usage->create_component( ).
      ENDIF.
    DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
    lo_interfacecontroller =   wd_this->wd_cpifc_alv( ).
      DATA lv_value TYPE REF TO cl_salv_wd_config_table.
      lv_value = lo_interfacecontroller->get_model(
    CALL METHOD lv_value->if_salv_wd_table_settings~set_read_only
      EXPORTING
        value  = ABAP_FALSE
    DATA:
    lr_input_field TYPE REF TO cl_salv_wd_uie_input_field,
    lr_column TYPE REF TO cl_salv_wd_column,
    lr_cb TYPE REF TO CL_SALV_WD_UIE_CHECKBOX,
    lr_column1 TYPE REF TO cl_salv_wd_column.
    lr_column1 = lv_value->if_salv_wd_column_settings~get_column( 'READONLY' ).
    CREATE OBJECT lr_cb
    EXPORTING
    CHECKED_FIELDNAME = 'READONLY'.
    lr_column = lv_value->if_salv_wd_column_settings~get_column( 'CARRID' ).
    CREATE OBJECT lr_input_field EXPORTING value_fieldname = 'CARRID'.
    lr_column1->set_cell_editor( lr_cb ).
    lr_column->set_cell_editor( lr_input_field ).
    lr_cb->set_read_only_fieldname( value = 'READONLY' ).
    check with above code it works for your requirement
    Thanks,
    Tulasi Palnati

  • Date Manipulation

    Currently, i'm designing an application which needs to correctly insert/fetch data of type Date to/from a database.
    Unfortunately, i'm new to the java utilities for doing manipulation of Date-type data.
    I need help to design procedures to do some things:
    First, let say I have objects of type Date, (d1 = 29/April/2008, Sunday), (d2 = 4/May/2008), and (d3 = 31/April/2008, Thursday).
    1. I need to validate & verify the date. I need a procedure which can tell me that the d1 is present in the real world thus it is a valid date, and in contrast d3 is not.
    2. I need procedures to operates the date objects.
    I need a procedure which tells me that d2 - d1 is 5 days.
    I need a procedure which can create a new date object if I add some days to a date object. For example d1 + 4 produces (d4 = 3/may/2008). And d2 - 4 produces (d5 = 30/April/2008).
    3. I need a procedure which tells me the name of the day for a certain date. For example, getDayName(d1) will return "Sunday".
    I really appreciate if You know some things about the issues above.
    p.s. As for the databases, I use the MsAccess 2000 for prototyping and MySQL for the real thing.

    akkumaru wrote:
    Currently, i'm designing an application which needs to correctly insert/fetch data of type Date to/from a database.
    Unfortunately, i'm new to the java utilities for doing manipulation of Date-type data.
    I need help to design procedures to do some things:
    First, let say I have objects of type Date, (d1 = 29/April/2008, Sunday), (d2 = 4/May/2008), and (d3 = 31/April/2008, Thursday).
    1. I need to validate & verify the date. I need a procedure which can tell me that the d1 is present in the real world thus it is a valid date, and in contrast d3 is not.If it's a Date object, there's nothing to validate--it is a "real" date. You're talking about validating String objects that represent Dates, not Date objects. Use SimpleDateFormat.parse(). If you setLenient(false) it will throw an exception on dates like April 31, rather than turning them into real dates.
    2. I need procedures to operates the date objects.
    I need a procedure which tells me that d2 - d1 is 5 days.Once you have two Date objects (as opposed to the String objects you have above), you have a couple of approaches:
    * Call Date's getTime() method on the two Dates, subtract the resulting millis, and divide by the number of millis in a day. Depending on your specific rules for how to count elapsed days, and due to the fact that not all days have the same number of millis, this may or may not give you the results you need.
    * Put the Dates into a Calendar. Add one day to the earlier date repeatedly until it catches up with the later date. This is simple and guranteed to be easily adaptable to your rules for elapsed days, but may be too big a performance it if you have to to it often for dates that are far apart.
    * A variation of the above is to add 365 days to the earlier date reapeatedly until the dates are within a year of each other, and then add or subtract days as needed to get them to match. This will be quicker for dates that are several years apart, but the code is slighly more complex.
    I need a procedure which can create a new date object if I add some days to a date object. For example d1 + 4 produces (d4 = 3/may/2008). And d2 - 4 produces (d5 = 30/April/2008).Calendar has an add method that will let you do this.
    3. I need a procedure which tells me the name of the day for a certain date. For example, getDayName(d1) will return "Sunday".SimpleDateFormat.
    p.s. As for the databases, I use the MsAccess 2000 for prototyping and MySQL for the real thing.I thought you were talking about Java dates. Are the DB columns of type DATE or DATETIME? Or are they VARCHAR?

  • SE14 data recovery(Urgent)

    Hi Guys,
    Is there a way to recover the data deleted from SE14?
    I was trying to delete one of my temp. tables and SE14 was holding the name from a earlier visit.I made a silly mistake and did not pay attention to the name and clicked the delete button.
    Can someone advice please...this is urgent...
    Thanks

    Well, I guess you'll just have to live with the basis folks' answer (that's what I would have expected anyway).
    What instance are you talking about, DEV, QAS, PRD?
    Maybe your company has a sandbox that could be used for the restore? From there you could pull table and data with a transport and re-import it back to your original system.
    Technically possible but I am not sure whether your basis folks would allow a transport from a sandbox into any other system within the transport route.
    Guenther

  • Table Data Transportation (Urgent)

    Hi Experts,
    Can you do me a favour, I can transport table structure from one client to another. but I want to transport my development client table data to production clinet. How can I do it?
    Waiting for your reply with positive hope. it is Urgent.
    with warm Regards
    Rajiv singh

    Hi..
    U need to upload the data into the database table in production separately..
    Do one thing..
    Create a transaction(program) which will upload the text file data into the database table.
    Transport this TCODE to production...and in production run this TCODE...specify filename an data will be uploaded to respective database table.
    Use GUI_UPLOAD function module for the same.
    Regards,
    DJ.

Maybe you are looking for

  • DS-BW:Data load called from BW failed after Source System program_id change

    Hi, In my BW 7.0 instance I have Data Services 3.2 as source system. Some time ago I have changed instance of Data Services I am connecting to - I just changed PROGRAM_ID in RFC connection parameters for that source system. Since that time when I am

  • IPod Touch (3rd Gen) completely unrecognized by multiple PCs - suggestions?

    Recently I picked up a 32GB iPod Touch from a pawn shop; the guy let it go for cheap since it was disabled and he couldn't figure out how to re-enable it, which I figured wouldn't be a problem. However, the device doesn't seem to be recognized in eit

  • IPhone activation lock problem please help

    My friend has bougth an iPhone 5 with iOS 7 through OLX . OLX is a website like craiglist where people buy there products directly to sellers. iPhone 5 when he bougth was good and was in working condition. He bougth it yesterday.But suddenly in the n

  • Can we delete the views created for a user in Oracle BPM J2EE WL

    I am using Oracle BPM 10.3 MP2 Enterprise Edition Version: 10.3.2 Build: #100486 Can we delete the views created for a user in workspace? Usually we are using the filter option within workspace and then saving it as view. Would like to know if we can

  • ROW_BASED_TARGET_ONLY

    Is it possible that a mapping in ROW_BASED_TARGET_ONLY mode would process no records on the same data that the same mapping in ROW_BASED mode would load some data from? The mapping will do insert / update, so it's supposed to process the same data se