I need to know about date function in Java

Hi All,
Here is my question - I need to subract 18 months from a particular date. How do I do that using Java coding?
eg: 09/30/2003 - 18 months = 03/30/2002
I have to to code this in Java in order to use it in one of my application. I would appreciate your help.
Thanks & Regards
Simly

Hi There,
Thank you for your reply...Need some more help...
This is the case I want to deal with. I need to calculate the value for the field called "mydate"
These are the three dates, I am going to deal with:
1.olddate = I have a value for it -> eg: 05/12/1998
2.today = Today's date -> eg: 09/30/2003
3.newdate = today.month - 18 months -> eg: today.month =09-18=03/30/2002
These are the three dates values.
Now what I need to do is,
If olddate(05/12/1998) > newdate (03/30/1998)
then "mydate" = newdate -> 03/30/2002
Else "mydate" = olddate -> 05/12/1998
I am a good C++ programmer & a student and I am right now learning all the Java packages. I am having the greatest problem with the calcuation of value to the variable "new date". And also with the "If condition statement". I am aware of the before, after, getMonth methods. But, I am having problem in using them in this case. Could you please give me the exact coding for the declaration of the variables and the value calculation(in this specific case). I would appreciate your time and help.
Thanks & Regards
Simly

Similar Messages

  • I need to know about FICO with functional flow diagrams!!! Anyone please?z

    hi friends,
    I want to know about the functional flow of FICO module. help me plz.
    regards,
    durai

    Hi:
    To know FICO in detail with functional flow diagrams or with documentation,
    Begin with SAP FICO Overview which explains the functionality of each sub-module.
    Regarding how it internally works in enterprises, You should know about SAP Implementation . In SAP Implementation
    ASIS  and Business Blueprint is prepared. This is used to configure SAP in order to meet the business requirement of the organization.
    Normally what the orgranization does manually i.e recording of journals in registers.
    SAP is ERP Software, in which the users records all the business  transactions in SAP Software.
    This will help the Management to know Financial results at the end of the year.
    Please give a reading to this SAP Implementation
    http://en.wikipedia.org/wiki/SAP_Implementation
    Also try to read SAP Case studies.
    Please let me know if you need more information.
    Assign points if useful.
    Regards
    MSReddy

  • Need To know about iOS Data Storage Guidelines?is it a Data base?

    hey..Friends i need to know about iOS Data Storage Guidelines?is it a Data base?

    https://developer.apple.com/icloud/documentation/data-storage/
    Please refrain from mutliptle posts of the same question.

  • Everything you need to know about Foxtel Go

    Foxtel on T-Box customers can self register Foxtel Go on 2 devices per Foxtel on T-Box subscription. You are able to view content on 1 of the 2 registered devices. The T-Box device will automatically be registered on your behalf and cannot be deregistered. You can change the device they have registered once per calendar month.
    To change a registered device you must log into the Foxtel Go app. As a Foxtel from Telstra customer please use your Foxtel My account details. As a Foxtel on T-Box customer please log in with your primary (i.e. the first username created and linked to your account) BigPond username and password.
    Once in the app go to the settings icon and choose 'manage my devices'. Within this section of the app you will be able to select de-register for the device you wish to change. To register, download the Foxtel Go app and log in. You will be prompted to register the device.
    Remember you can only change one device once per calendar month. If you are still able to make a change, you will be advised of the number of device registrations left this month.
    If you recently registered your T-Box, you should have access to Foxtel Go within 1 hour. If you are experiencing errors please try closing the Foxtel Go App and logging in again. If you are still unable to access any content please contact us via Telstra 24x7 or Telstra Technical Support on 13 22 00
    If you swap your Foxtel on T-Box service to a new device, your Foxtel Go service is not affected as it is associated to your BigPond username and password, and not the T-Box device.
    When trying to make a second device change within a month the de-register' button will be greyed out, preventing the change.
    Current channel rights only allow Foxtel Go to be registered on 3 devices per Foxtel Account. For Foxtel on T-Box customers, the T-Box counts as your 3rd device.
    The parental control function is specific to Foxtel Go and managed in the app via the settings icon. To access parental control:
    Go to the settings' icon in the app (top right)
    Access parental controls'
    Choose which classifications you'd like to restrict
    All R-rated content is automatically blocked, but you can personalise your restrictions for other ratings. To do this go to Settings in the Foxtel Go app, turn on Parental Controls and restrict the classifications you would like to block. If this is the first time you do this you'll be prompted to set a 4 digit PIN specifically for Foxtel Go. You can use this PIN to change your parental controls in the future. This PIN is only applicable to the Foxtel Go app. For Foxtel from Telstra customers, the PIN is not the same as you use on your IQ or Set Top Box, and you will be required to setup a new PIN to restrict content on Foxtel Go. For Foxtel on T-Box customers, the PIN is not the same as you use on your T-Box, and you will be required to setup a new PIN to restrict content on Foxtel Go.
    Foxtel Go content is unmetered with Telstra BigPond Home Broadband services. With other internet service providers this will be offset against your data plan.
    If you use Foxtel Go on your device with any 3G/4G telecommunications service provider, including Telstra, usage isn't unmetered and you will incur data charges when using Foxtel Go. The below list provides an indicationof the data you will use per device on the various app settings, based on watching an hour of TV. To view your settings go to the 'settings' icon in the Foxtel Go App, turn on 'video settings' and choose your preferred quality:
    3G Phone/Tablet Best: 320 MB per hour / Low: 170 MB per hour
    Wi-Fi Phone Best: 420 MB per hour / Low: 320 MB per hour
    Wi-Fi Tablet Best: 720 MB per hour / Low: 320 MB per hour
    Wi-Fi PC/Mac Best: 1310 MB per hour / Low: 470 MB per hour
    The size of each episode or Movie on Catch up TV can be found on the Synopsis tab.
    You can use Foxtel Go at a Wi-Fi location or a personal hotspot when you are in Australia provided you have an internet connection. Some locations offer Wi-Fi hotspots where you can log onto the internet for free. e.g. McDonalds, Starbucks, etc. Any data charges incurred are charged to the business and not to you. When connected to Wi-Fi, you'll see a Wi-Fi symbol on your device.
    Foxtel from Telstra customers with a Foxtel iQ or iQHD set top box can Remote Record and send a channel change to their set top box. Unfortunately this functionality is not available to Foxtel on T-Box customers.
    You can pause and rewind the last 30 minutes of Live TV, even if you've just changed to that channel. Due to device restrictions users of Samsung Android devices are unable to use this feature.
    Foxtel Go is a streaming video service. Streaming means that images and sound are delivered live to your device to view when you press Play, rather than being downloaded to your device to view at a later time.
    Games you'd normally see on Foxtel from Telstra or Foxtel on T-Box on FOX SPORTS 3 are broadcast on Foxtel Go on the Footy Play Plus channel
    There are no Catch Up of AFL games or magazine shows on Foxtel Go due to content restrictions.
    The key symbol indicates that a channel isn't part of your package. You need to upgrade your Foxtel from Telstra or Foxtel on T-Box package to watch it. Your package can not be updated through the Foxtel Go app. For Foxtel on T-Box customers you can update your packages in the T-Box App, at www.telstra.com/tboxsetup, via 13 2200 or in store. For Foxtel from Telstra customers you can update your packages through the store or via 13 1999. The lock symbol indicates that, as part of your parental control setting, you've locked this classification of content, and can't watch it. If you want to change the settings then the primary (i.e. the first username created and linked to your account) account holder can change these by:
    Go to the settings' icon in the app (top right)
    Access parental controls'
    Choose which classifications you'd like to restrict
    No other username or password can change the parental control settings.
    We may be required to block out specific programming from time to time, e.g. if a channel doesn't have the legal right to broadcast the programme over the internet. However, all live channels are the same as channels you watch through Foxtel from Telstra or Foxtel on T-Box.
    The vast majority of the Foxtel on T-Box content is available via Foxtel Go. There are some minor exceptions. MTV Music and MTV Dance channels are not available. FOOTY PLAY and FOOTY PLAY+ (overflow) channels are not available on PC and Mac only.
    Access to Foxtel Go is included in your Foxtel on T-Box and Foxtel from Telstra subscription. However, you will incur data charges when accessing the service on a 3G/4G network.

    Re: Everything you need to know about Foxtel Go
    Iam book in to have foxtel install on 2nd of March was offered Thursday the 28 my appointment has been cancelled so can be home Thursday I put a complaint in as was told it was 1hour for change over from T Box but no one has got back to me

  • What does a BI Developer need to know about SAP tables and why?

    Hi,
    i.
    As a BI Developer, to what extent do you need to know about SAP tables?
    e.g. if you work mainly in the functional areas LO and FI
    ii.
    For example, I know that in Finance, GL relates to the tables BSEG and BKPF.
    And if it is important to know about them, then which other tables need to be known and for what reasons?
    e.g. do I need to know all these tables: http://www.erpgenie.com/sap/abap/tables_fi.htm
    iii.
    I thought as a BI Developer, knowing that a particular datasource, e.g. 0FI_GL_4 contains line items is enough and you replicate it to BW and work with it. Why is there the need to know the tables from which this datasource gets is data?
    iv. What is the main difference between the FI datasources and the LO datasource?
    Thanks.

    Hi,
    i.  As a BI Developer, to what extent do you need to know about SAP tables?
    e.g. if you work mainly in the functional areas LO and FI
    Not required, but today business demands so you required this Knowelgde.
    ii.
    For example, I know that in Finance, GL relates to the tables BSEG and BKPF.
    And if it is important to know about them, then which other tables need to be known and for what reasons?
    e.g. do I need to know all these tables: http://www.erpgenie.com/sap/abap/tables_fi.htm
    We can't say yes or No, so based on your requirement you need to sit with Functional COnsultanst and the understand the Business Requirements and develop the OBjetcs.
    iii.
    I thought as a BI Developer, knowing that a particular datasource, e.g. 0FI_GL_4 contains line items is enough and you replicate it to BW and work with it. Why is there the need to know the tables from which this datasource gets is data?
    If you want to know the data flow and reconsilization then you need to know it else not required
    iv. What is the main difference between the FI datasources and the LO datasource?
    Yes, one main difference is There is no setup table concept for FI DataSource*
    Note: If you want to become a good BW consulatnt you must know about Tables for normal BW consultant it is not required.
    Thanks
    Reddy

  • I need to know the date of the last Monday

    I need to know the date of the last Monday
    If today is Monday then I need todays date
    If today is Tuesday then I need yesterdays date etc....
    If today is Sunday then I need to know the date 6 days ago etc....

    the day() function will tell you what day of now() is as an integer: 1=Sunday 7=Saturaday.
    You know that Monday is 2.  The difference between today's number and Monday's number (with a little mathmatical juggling to wrap Sunday to the previous week  -- I would probably just convert -1 to 6 with a simple if statement after substracting 2 from the day() value.).
    Subtracting (adding a negative value) of this difference with the dateAdd() function will give you the date of that previous Monday.

  • Need to know the standard function module/program in E recruitment

    Hi All,
    I need to know the standard function module/programm that defaults the 'Functional area' field in the posting page from the requisition page.
    Early responce is greatly appreciated.
    Thanks and best regards
    Rajeev

    Hi Masa,
    Thanks for your reply.
    We are using Assets with the integration of Project systems. We are now in 4.6C R/3 & SRM 5.0 system. And now R/3 upgrade and SRM upgrade going on smultaniously to ECC6.0 and SRM 7.0 respectively.
    I would like to know any new functionality available in the latest upgrades and we have done lot of customization for Asset Procurement. And would like to go with Vanilla.
    Can you please provide me some inputs about the Project (WBS element ) based Asset Procurement in SRM as standard.
    Thanks and Regards,
    Ramesh

  • Need to know the standard function module in E-Recruitment

    Hi All,
    I need to know the standard function module that defaults the value of 'Functional area' in 'Posting' from 'Requisition'.
    Early response is greatly appreciated.
    Thanks an best regards
    Rajeev

    Hi Masa,
    Thanks for your reply.
    We are using Assets with the integration of Project systems. We are now in 4.6C R/3 & SRM 5.0 system. And now R/3 upgrade and SRM upgrade going on smultaniously to ECC6.0 and SRM 7.0 respectively.
    I would like to know any new functionality available in the latest upgrades and we have done lot of customization for Asset Procurement. And would like to go with Vanilla.
    Can you please provide me some inputs about the Project (WBS element ) based Asset Procurement in SRM as standard.
    Thanks and Regards,
    Ramesh

  • HT1620 So what do I need to know about  using my iPad on public networks, say restaurants,etc. Can I use passwords of any kind, or will I be compromised?

    So what do I need to know about using my iPad mini on public networks, say in restaurants. Will I be compromised by using  passwords? What protects my iPad?

    To date, the iPad/iPad mini/iPhone/iPod Touch produces have remained secure.
    In a public place, you do not control the network, so be careful of what activities you perform, such as accessing your bank, or other sensitive places.
    Just surfing and reading your email is generally speaking not a problem.  Hopefully, your email connections are over secure SSL connections.

  • FAQ: I already have a Revel account. What do I need to do? What do I need to know about this?

    Q: I already have a Revel account. What do I need to do? What do I need to know about this?
    A: If your Revel account uses the same Adobe ID as your Photoshop.com account, your JPEGs will be moved there. Otherwise, a new Revel account will be set up for you using the same Adobe ID you use with your Photoshop.com account.
    Revel accounts can be merged manually. Use the Adobe Media Downloader to download all of the JPEG photos from your Photoshop.com library and then upload those photos to your existing Revel account.
    Click here to archive your Photoshop.com library so you do not lose any files.
    You will be asked to download an Adobe Air application called Media Downloader

    Your .mac Mail account will continue to operate normally as long as you access the account from the Mac's Mail program. Read this:
    What if I just want to keep using my email on all my devices?
    As of May 1, you can choose to keep using your mail after MobileMe ends, even on devices that don’t meet the iCloud system requirements. Just go to me.com/move and select the option to keep using your email after MobileMe ends. Once you have completed this short process, your mail will continue to work on devices that don’t meet the iCloud requirements after MobileMe ends on June 30th, 2012.
    iCloud is a collection of features that allows you to sync Safari bookmarks, Calendar items, Contacts, and iWork documents (Pages, Numbers) among multiple devices, among other things. Your photos in iPhoto will not be affected.
    iCloud is most valuable for people with iOS devices and Macs and requires OS X 10.7 "Lion".
    Here is some more information: http://www.apple.com/mobileme/transition.html

  • I NEED TO KNOW ABOUT DRIVING TABLE...PLEASE

    Well, My name is Adan. I am from Panama.. my english is not
    good. But I'll try. I need to know about driving tables and how
    have to choose a driving table and how optimizer proccess an sql
    statment.
    Example:
    Employees have (1,000,000 rows),
    dept have (100 rows)
    Category have (100 rows)...
    I need retrieved all employees with category and dept name for
    those employee with salary > 100000
    Well, What is the driving table and where i have to put this one
    in the from clause ? What about order in the where predicate...
    First ?
    Select E.name, C.category, D.Departement
    from Employees e, dept d, category c
    where
    and d.cat = c.cat
    and e.deptno = d.deptno
    and e.salary > 100000
    Last ?
    Select E.name,C.category, D.Departement
    from dept d, category c ,Employees e
    where
    and d.cat = c.cat
    and e.deptno = d.deptno
    and e.salary > 100000
    I apreciate your help....Thanks and sorry for my english....
    Bye..

    Adam,
    If you set your optimizer = choose and analyze the tables and
    indexes to generate statistics, then your system can use the
    Cost Based Optimizer (CBO) and, like David said, it will
    automatically choose the best access path, and the order of
    things will not matter.
    If your optimizer is not set to choose or if there are no
    statistics, then it will use the Rule Based Optimizer (RBO), in
    which case, the only thing that matters is the order of the
    tables in the from clause. When using RBO, the driving table
    should be at the end of the from clause, in the right-most
    position. The driving table is the one such that, after the
    restrictions have been applied, returns the smallest number of
    rows. You would have to compare the number of rows in the
    employees table where salary > 100000 to the number of rows in
    the dept table (100) and the number of rows in the category
    table (100).
    In RBO, if there are more than 100 rows in the employees table
    where salary > 100000, then your from clause would be:
    FROM employees e, dept d, category c
    In RBO, if there are less than 100 rows in the employees table
    where salary > 100000, then your from clause would be:
    FROM category c, dept d, employees e
    This is all that applies to the example you have given, however
    there are other things that can apply in other situations. For
    example, if there is an outer join to a table, the table that
    has the (+) cannot be used as the driving table.
    Barbara

  • HT201359 I need to know a date when I purchased on itunes

    I received a bill on July 31, 2013 stating that I purchased 2 candy crush saga items.  I need to know the date that I purchased these items.
    <Email Edited by Host>

    This is a user-to-user forum, you are not speaking with Apple here.
    Review this article for information on how to view your purchase history: http://support.apple.com/kb/ht2727

  • Need detail information about Data Cleanse Transform.

    Hi Every One,
    I Need detail information about Data Cleanse Transform.
    1. what is Local Cleansing Packages?
    2. what are Directories and Dictioneries.
    3. Data Cleanse Transform INPUT , OPTIONS, OUTPUT tabs and usage.
    4. Details on Transform Input Field name in Data Cleanse INPUT tab.
    5. What is PARENT_COMPONENT,FILED_NAME,FIELD_CLASS,CONTENT_TYPE in  Data Cleanse OUT POT TAB.
    I tried using "EnglishNorthAmericaDataCleanse" transform with NAME_OR_FIRM_LINE1.  When I ran the job I got below warning message and my job was success full nut status it shown as failed.
    Warning message:
    "Trasform Data Cleanse is unable to retrieve cleansing packages from Cleansing Package Builder. Only local cleansing packages are available. Info: Unable to log on: Could not connect to server d184932040.sng1.attens.net:6400.  Please check that the server name is  correct, and that the server is running. "
    Please make me understand, why did I get above message.
    Thanks in Advance ...

    Hello,
    Cleansing package is a reference file that contains content and rules around person, firm, title, phone data and so on.  Cleansing package used to be referred to as dictionaries.  Directories are usually referred to address reference data or address directories.  The input, output and option tabs are similar to other Data Quality transforms.  For detail information on what each of the input fields and output fields are and how the options work can be found in the Data Services’ Designer Guide (http://help.sap.com/bods).
    The warning message you are getting is stating that Data Services is not able to connect to the server to check to see if you have made modifications to the PERSON_FIRM cleansing package.  You are not required to make any changes to the PERSON_FIRM cleansing package, but can change rules or content based on your organizational rules.  If you want to make changes you will need to install SAP Information Steward.  If you would like to install SAP Information Steward you can find documentation for installation on the Help Portal, http://help.sap.com/bods, along with some great Videos.
    You can also find some great Data Services Product Tutorials on the SAP Community Network, at http://scn.sap.com/docs/DOC-54115.
    Thank you,
    Lynne Lintelman

  • Urgent. Need to know about user exits.

    Hello Everyone,
    I am new to this forum. I need to know about user exits.
    My next project requires me to implement user exits, screen exits, etc.
    I am a rookie to this topic.
    Can anyone help me as to how to start with his topic.
    Any sort of help is appreciated.
    Cheers,
    Neelam.

    Hi Neelam,
    Welcome to sdn.
    This is a very frequently asked topic.
    Please use teh search forum option for this type of queries.
    http://help.sap.com/saphelp_47x200/helpdata/en/c8/19763443b111d1896f0000e8322d00/frameset.htm
    Regards,
    Ravi

  • I need to know about a value on my credit card .. I do not own

    I need to know about a value on my credit card .. I do not own

    Sorry, but I do not understand your question. Would you please explain in more detail? If you're not comfortable in English, try posting in your native language.
    Regards.

Maybe you are looking for

  • DB + grid upgrade from 11.2.0.1 to 11.2.0.3 with EBS 12.1.3

    HI i am planning to upgrade oracle RAC DB and clusterware from 11.2.0.1 to 11.2.0.3 a little about my existing architecture EBS 12.1.3 on 2 node application tier and 2 node RAC DB OS RHEL 5 64-bit please help me on its documentation as i am not able

  • Error while creating Data Form Definition report from Planning

    Hi All, Working on Planning 11.1.2 (x64) I tried to generate a Data Form Definition report from Planning and found that I get an error if I select the option "Include member selection list". By going a bit deeper, I realised that it errors for some f

  • Cant add files/folders to library

    Everytime i try to add a file or folder i click on it then click ok and the screen just disapears nothing happens at all. I dont know what to do im very frusterated because i have over 1000 songs on my computer and i cant get any of them in to itunes

  • IPod speakers for golf cart?

    I'm looking to find a set of "outdoor" speakeers that I can mount on my golf cart and play my iPod thru. I've read some of the archived articles on this subject and learned that apparently I need powered speakers. ( I had a set of Radio Shack's years

  • ConfigFree Autoswitch wireless to wired lan

    I use laptop on office wired Lan then at home on wireless lan. I have set auto network switch to switch networks. Then I have set auto profile switch using SSIS and saved a home wireless LAN profile that changes proxy and printer. It all works when g