Comparing two dates and adding days to date

Hi,
I want to compare two dates(like 2006/10/21 and 2006/11/2),how can i compare these two dates,like which is greater.And if to the second date,i want to add some number of days like 10 days,how can i add so that the date becomes 2006/11/12).
Please reply soon.Thanks

No,all other queries are different,as they have the
date in this format
'2006-03-06 " but i have the date in this format
"2006-03-06 10:26:46.0",
i.e the time is also assciated with it.
If I have only the date(in string format or date
date format 2000/12/1),then I can easily do it,but
I have the time also.If I have the date only,then I
can split the date into three strings,and after
converting into integer I can pass it to the
constructor,but what about the time?SimpleDateFormat can parse "2006-03-06 10:26:46.0" date too:
           SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss.SS");
           Date date = dateFormat.parse("2006-03-06 10:26:46.0");
           System.out.println("date = "  +date);

Similar Messages

  • Compare two tables and log the difference

    Hi,
    I want to compare two tables and log the difference in new table with the fields as (old value,new value, column name). The column name should be the changes value column

    Can you show an example?
    SELECT Foo.*, Bar.*
       FROM Foo
            FULL OUTER JOIN
            Bar
            ON Foo.c1 = Bar.c1
               AND Foo.c2 = Bar.c2
               AND Foo.cn = Bar.cn
     WHERE Foo.key IS NULL 
        OR Bar.key IS NULL; 
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Table for  the PO Date and Stock Transfer Order Date of a material no

    Hello Everyone!
    I am having a requirement where I want both the Purchase Order Date and Stock Transfer Order Date of a perticular material no.
    On the basis of difference of these two dates I want to find out the period for which the material was present in supplying plant.
    I am not getting the table through which I can get these two dates for a material.
    Please help me out.
    Its urgent.

    hi,
    see these tables:
         EKKO – Purchase Order Header Table
         EKPO – Purchase Order Item  Table
         EKBE – PO History table.
    reward if its useful

  • Delivery not before date and Delivery not after date

    Hi Everyone,
    Can anyone help me in this issue, we need to map "delivery not before date" and "delivery not after date" from an EDI 850 into a sales order.
    Are there any fields to which we can map the data? if not would anyone suggest how to go about it?
    Thanks,
    Michelle.

    Michelle,
    We have a similar requirement, albeit we call it a Delivery Window. We have implemented this by mapping two E1EDK03 qualifiers (we use 033 & 034) to two Z fields extended to VBAK, which we then include in our Sales Order Delivery Date logic.
    Not very elegant, but then my understanding is that SAP has no concept of the Delivery Window.
    Cheers, Paul.

  • Fieldes planned delivery date and actual good recipt date for SAP QUERY

    Hi Gurus
    I am changing sap query. I need to find two fieldes  : planned delivery date and actual goods recipt date
    I dont know MM tables, do you know wrhere are?
    in table EKPO i don't find the fieldes.
    Thanks in advance

    Thank a lot!
    Regards

  • Previous month first data and previous month last date

    can any body have query to get previous month first date and previous month last date.
    Ex: First day of the previous week:
    TIMESTAMPADD(SQL_TSI_DAY,-6, (TIMESTAMPADD(SQL_TSI_DAY, DAYOFWEEK(CURRENT_DATE) *-1,CURRENT_DATE)))
    Last day of the previous week:
    TIMESTAMPADD(SQL_TSI_DAY, DAYOFWEEK(CURRENT_DATE) *-1,CURRENT_DATE)
    can anybody have it for first day of the previous month,last day of the previous month?
    Edited by: user12255470 on Apr 7, 2010 3:30 AM

    Hi,
    1st day of previous month :
    TIMESTAMPADD(SQL_TSI_DAY, ( DAYOFMONTH(TIMESTAMPADD(SQL_TSI_MONTH,-1,CURRENT_DATE)) * -1) + 1, TIMESTAMPADD(SQL_TSI_MONTH,-1,CURRENT_DATE))
    last day of previous month :
    TIMESTAMPADD(SQL_TSI_DAY,DAYOFMONTH(TIMESTAMPADD(SQL_TSI_MONTH,-1,CURRENT_DATE)) * -1 , TIMESTAMPADD(SQL_TSI_MONTH, 1, TIMESTAMPADD(SQL_TSI_MONTH,-1,CURRENT_DATE)))
    Please mark Q answered and award points for correct answers !
    Thanks
    Alastair

  • Mapping of CRM Territory Hierarchy data and BI Territory Hierarchy data

    Hello friends,
       I Want to know the easy way to compare the CRM Territory Hierarchy data and BI Territory Hierarchy data . Previously We had an issue with Territory Hierarchy data  and applied note on CRM side and it resolved. Now we want to see whether the Territory Hierarchy data is sync in between BI and CRM.
       Please let  me know if you have an idea what is the solution if both systems are out of SYNC.
    Thanks,
    SRI.

    Hi Raimon,
    Please check note-
    Note 460302 - CRM_MKTPL: Double message concerning BW update
    Regards,
    Anil

  • Req. delivery date and plan order finish date relationship

    Dear Experts,
    I have a question on setting the req. delivery date and plan order finish date relationship. Now, I want the plan order finish date is one day before the req. delivery date, is it possible to set it in configuration? Please advised! Many thanks!
    Regards,
    Matt Yim

    Matt,
    Please use a schedule margin key(SMK) in the material master MPR2 view which has float after production defined as 1day.
    If there are no SMK with that defination then you can define you own in customisation and assign the same in the material master. (SPRO--->Production ->MRP->Planning ->Scheduling and Capacity Parameters->Define Floats).
    Regards,
    Prasobh

  • TS2972 used to be able to pick out which songs in iTunes in my computer were not on a 2nd computer on homeshare in iTunes 10.  Now with V11, cant find the button that compares two libraries and finds the songs that are different.  Anyone know how to do th

    Used to be able to pick out which songs in iTunes in my computer were not on a 2nd computer on homeshare in iTunes 10.  Now with V11, cant find the button that compares two libraries and finds the songs that are different.  Anyone know how to do this now?

    Jneklason wrote:
    ~snip~
    I know this email is confusing and really hard to understand...perhaps now you will know how i've been feeling--lost and confused with all the mis-information, with a hit and miss phone, and out of time with all the 1 1/2 hr to 2 hrs EACH wasted on this issue.
    On top of all this, I can't even find out how to file a complaint with anyone higher up than Customer Service.
    I hate to tell you this, but you didn't write an email. You wrote a discussion post on the Verizon Wireless Community forum which is a public peer to peer forum. Unfortunately since you didn't mark your post as a question, the VZW reps that roam this community won't ever see your post. Before you re-post it, don't. Duplicate posts get removed from the community.
    I see there were several missteps both by the reps and yourself in your post. First you should have insisted on returning the phone within the 14 day return policy period. Second which Samsung Galaxy mini model did you purchase? The S3 mini or the S4 mini? Did you do any research prior to deciding on this device. The reps at that time deflected the easiest course of action, by trying to get you to replace the phone under insurance instead of returning the phone. The Early Edge payment option requires the current phone on the line using the early Edge must be returned to Verizon Wireless. Did you once considered going to a third party site like Swappa to purchase a gently used device for your daughter?

  • Having arranged some scanned pictures in an album in I-Photo how can I keep them in the order I have chosen when I move the album. They all have the scan date and not the taken date and move to new positions if I move them from one album to another.

    Having arranged some scanned pictures in an album in I-Photo how can I keep them in the order I have chosen when I move the album. They all have the scan date and not the taken date and move to new positions if I move them from one album to another.
    Is there any way to re-number them in the order I have chosen so that they can then be sorted by number? The scans are all from pre-digital images that I wish to move to a photobook and I don't want to have to organise them twice!
    Thanks for any suggestions.

    I was a bit short, Chris, sorry. It is limited, what can be posted, when typing on an iPad.
    Now I am back on my Mac. I meant the following:  Batch Change the date for a large range of photos, that should have a date stepped in increments.
    Select all Photos at once and use the command "Photos > Batch Change".
    Then set the date for the first photo and select an increment, e.g. one minute.
    Now all photos will get a new date assigned, incremented by one minute, in the sequence you have selected. So you will be able to sort them by date.  This way it will be unnecessary to change the titles or filenames.

  • What is the difference between delivery date and actual goods issue date?

    Hi ,
    Can you please tell me the difference between Delivery date and Actual goods issue date ?
    Delivery data can be be greater than goods issue date?
    Thanks,
    Ajay

    Hi Ajay,
                  Delivery date means its the original date on which the delivery should be done.Actual goods Issue date is the date on which goods to be delivered according to the purchase order.There can be delay in the delivery so we maintain 2 objects.
    Yes delivery date can be greater than Goods Issue date.
    Hope this clears
    Regards
    Karthik

  • Inserting Date and Time into a date field

    Okay I am a bit of a Oracle newbie. I am trying to insert the following date and time into a date field and I don't know how to format the second part of the to_Date() function.
    Date/Time: 5/29/2003 7:58:45 PM
    Thanks,
    Branden

    I believe you would want
    to_date( '5/29/2003 7:58:45 PM', 'MM/DD/YYYY HH:MI:SS AM' )
    Note that tahiti.oracle.com has all of Oracle's documentation, including the very useful SQL & PL/SQL reference manuals, available for free.
    Justin

  • MTD(Month To Date) and YTD(Year To Date) with one example

    can any ont Explain about MTD(Month To Date) and YTD(Year To Date) with one example plz

    Hi,
    Can you please elaborate.
    MTD is from the 1st of the current month till today's date.
    YTD is from 1st Jan till today's date.
    If you trying to build this is query. Create restricted key figure and put restriction on calday with a customer exit for the same.
    Thanks,
    S

  • Difference between P.O.date and P.O.created date

    Hi,
      Could you tell me difference between purchaseing doucment date and purchase order creaed date.
        Because some time in my org. po created after GR means in past date. So there is difference between
        po date and po created date. where this po created date is maintained in purchase order
               Thanks and Regards
                      Anil

    Dear Anil,
    Please check table EKKO with ta SE11.
    Created Date => EKKO-AEDAT
    Date on which the record was created
    Document date => EKKO-BEDAT
    Date on which the purchasing document was created
    EKKO-AEDAT = Date on which the record was created
    and also "Created By" also recorded automatically
    by system.
    Document date or EKKO-BEDAT normally default as
    today when you create the PO via ME21N. This field
    appear at top right of the screen. However this date
    can be change to any date that required.
    Thanks
    Loke Foong

  • I would like to compare two field and then is it's true then the output will be the 2nd one

    Hello All,
    I am doing a mappong where i need to compare two field and then if there are equal the 2nd one should be the output and 2nd value will be using multiple segment.
    It's for shipment.
    Regards
    Rituparna

    Not sure if i understand correctly. But you are trying to compare one field with multiple occurrences of another field.
    You can make use of the node function "Use One as Many" and repeat the first value as many times as the second value.
    Please refer to below wiki.
    Explain node functions - Process Integration - SCN Wiki

Maybe you are looking for

  • Fire trigger once when inserting 50 rows

    Is there a way to fire a trigger once after inserting several rows in a table within a single transaction. I dont want the overhead of firing the trigger for each row.

  • 1..n cardinality mapping don't  work

    Hi Experts I've created a web dynpro application, with context Orders , it cardinality is 1..n. In BPM Diagram Editor in NWDS, i create an activity, create a task to this web dynpro component. When i get the context of this web dynpro, and try to map

  • Database Link name altered automatically

    Hi everybody, I'm facing here some strange behavior when I'm trying to create a database link. Here's the statement for creating the database link: CREATE DATABASE LINK "DEVELOP" CONNECT TO "XXX" IDENTIFIED BY XXX USING 'develop'; After starting Orac

  • Updater is taking forever!!!!!!

    This is begining to aggrevate me. I'm trying to put the updated software onto my iPod but it has taken me 10 and still counting hours to finish. I've tried this for two days now with the same results: "Do not Disconnect" (which means nothing). Help!

  • Old fh7 files not valid Freehand documents

    Does anyone know why some of my old FH7 files cannot open in either of versions 7, 9 or 11? The error message tells me that they are not valid Freehand documents. I already have at least a dozen of these, with potentially dozens more. As i have no id