How do i get the date when enter a week number

Hi, can anyone tell me how do i get the date when enter a week number??
let say, i enter week number 4 and year 2008
result=26-01-2008
thanks..

import java.util.Calendar;
public class testCalendar {
     public static void main(String args[]){              
          int year=2008;
          int week =5;
          Calendar now=Calendar.getInstance();
          now.set(Calendar.YEAR,year);
now.set(Calendar.WEEK_OF_YEAR,week);
          System.out.println(now.getTime());          
hai, anyone know why i can't get the result:27-01-2008
i always get two day later. That is 29-01-2008
no wonder how i change the week number and year.
for example: week=7, year=2007
expected result:11-02-2007
but the result is 13-02-2007
thanks..
Edited by: Angel_Wei on Sep 1, 2008 11:58 PM

Similar Messages

  • When copying one of my old cassettes to a CD how do I get the data - album name, artist, etc. to show up when the CD is inserted into a player?

    When copying one of my old cassettes to a CD how do I get the data - album name, artist, etc. to show up when the CD is inserted into a player?

    To what format file are you saving from Audacity?  Although technically AIFF format can save data tags within the file itself I have not found this to always work with all applications.  Likely the information you enter into Audacity is just being saved in the file name.  When you add this file to iTunes, if iTunes cannot find tags it recognizes it will simply add the track with the file name as the track name.  You need to add the tracks to iTunes, then enter the information using File > Get Info for a track or series of tracks,
    Some of the above information may vary slightly depending upon the file format being used.
    It helps when asking questions here to provide as much information at the onset as possible.  We didn't know until this stage that all these menus were in fact part of Audacity and not iTunes.

  • How can I get the Date & Time to appear on my final project in iMovie11?

    I am using iMovie 11 and have imported video from a Canon Vixia-HF21 camera. The EXIF data is imported along with the video but when I produce the final product, the date and time do not appear.  How can I get the Date  & Time data to appear on the final product?

    There is a date and time Title you can use. If I recall correctly, it displays date plus hours and minutes, but not seconds.

  • How Can we get the data from Non-SAP to SAP in WebDynpro

    Hi,
    I hope u understand my query, How can we get the data from Non-SAP to SAP thru WebDynpro Programming.
    Help out with the steps for getting the data or procedure.
    Regards,
    Mutyapu

    You can expose the APIs in the Non-SAP backend as Web Services, and consume them in SAP by creating an Enterprise Proxy. Then these can be called just like normal class methods from Web Dynpro.
    Regards,
    Nithya

  • I have a Mac Pro OS 10.7.5 and have a DVD+R disc with files on it, but it ejects the disk after about 10 seconds--what to do?  How can I get the data off this disc?  I can see it has been already burned, so files are on there?

    I have a Mac Pro OS 10.7.5 and have a DVD+R disc with files on it, but it ejects the disk after about 10 seconds--what to do?  How can I get the data off this disc?  I can see it has been already burned, so files are on there?

    Try cleaning the lens and see if that will restore functionality to the DVD drive.  Use a DVD lens cleaning disk, if you have a can of compressed air, shoot some into the slot or wrap a fine microfiber cloth (eyeglasses cleaning cloth)  around a business card and insert it gently inside the slot.
    If no success, make an appointment at an Apple store genius bar and get a free diagnosis from them.
    Ciao.

  • How can I get the data back from my game

    How can I get the data back from minecraft if I deleted the app and bought with a different Apple ID

    No, they are tied to the ID that purchased them, and cannot be transferred to anyone else.

  • How can i get the date of the last update of one PL/SQL package ?

    Hello,
    How can i get the date of the last update of a PL/SQL package
    named MYPACKAGE ?
    Thanks in advance ! ;-)

    to get the timestamp,last ddl time of object
    select timestamp,last_ddl_time from user_objects
    where object_name='<package name>';
    this will give you last transaction time ,date of object

  • How can I get the date of the next monday from the currentday?

    How can  I get the date of the next monday from current day? Please advice.
    mayooran99

    Hi mayooran,
    Please try the following code
    DateTime nextMonday = DateTime.Today.AddDays(((int)DateTime.Today.DayOfWeek - (int)DayOfWeek.Monday) + 7);
    Best regards,
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How do I get the date to display on ipad lock screen?

    How do I get the date to display on ipad lock screen?

    The day and date should display on the lock screen, e.g., "Wednesday, March 19"
    What are you seeing?

  • How can I get the date and time and display it on the report main page?

    Gurus,
    How can I get the date and time and display it on the report main page?
    Thanks!

    Hello,
    You can create a Formula Colum returning a date :
    function CF_1Formula return Date is
    begin
    RETURN(SYSDATE);
    end;
    Put a Field in the Layout having this formula column as source .
    Regards

  • My iPhone says "o death" where the date should be on the lock screen, why is it doing this and how do I get the date back?

    My iPhone says "o death" where the date should be on the lock screen, why is it doing this and how do I get the date back?

    I tried powering off and on and it went away, but I can't tell if it's been broken into since everything works fine (I'm using it now) is there a test to see if it's been broken into?
    Thanks for all your replies!

  • How would I get the date of last Monday?

    How would I get the date of last Monday?

    I've done the following, does it seem right?
    public static const millisecondsPerDay:int = 1000 * 60 * 60 *
    24;
    * This function sets the mimimum and maximum range
    private function sliceChartWeek():void{
    var max:Date = new Date();//current date is our max from
    which we will calculate the min
    var day:uint = max.day;
    var min:Date = new Date(max.getTime() - (millisecondsPerDay
    * (max.day - 1)));
    dateTimeAxis.minimum = min;
    }

  • How do u get the data from server? if server send by bytes?

    how do u get the data from server? if server send by bytes?
    i have tried using bufferedinputstream to get the data n getting the bytes but there is some data missing.i couldnt all data.so my image cant be display

    If you don't get helpful replies, I suggest you try to improve your question style a bit. There are many non native English speakers around here and the ability to phrase slick sentences varies. But for a start you could try to adhere to minimal English language standards like starting a sentence with an uppercase letter, and ending a sentence with a dot and a blank to separate it from the next sentence. Don't use ellipses (...) all over the place suggesting that the reader knows what you want to say. Rather please say it.
    Its is good style to only post the necessary code to understand the problem. However, the code you posted seems to be cut off too early to even get a grasp at what you are trying to achieve.
    Harald.
    BioMed Information Extraction: http://www.ebi.ac.uk/Rebholz-srv/whatizit

  • How can we get the prompt to enter IP Address, Subnet Mask , gateway and DNS Server during Task Sequence?

    How can we get the prompt to enter IP Address, Subnet Mask , gateway and DNS Server during Task Sequence?

    This is for 2007 but may still be relevant for 2012
    http://hexdump.net/?p=391
    Cheers
    Paul | sccmentor.wordpress.com

  • How can I get the data array from SQL Server Database?

    Hi,
    I can write a data array(2D)into a table of my SQL Server Database. The data array was writen to a column with image type. I know a data array is transformed a binary string when writing into database, but I dont know how to get the data array when I fetch the binary string from database.
    My question is:
    How to transform the binary string into data array? which vi's should I use? I have tried unflatten from string but failed.
    Any response is appriciated.
    Red

    happyxh0518 wrote:
    > I can write a data array(2D)into a table of my SQL Server Database.
    > The data array was writen to a column with image type. I know a data
    > array is transformed a binary string when writing into database, but I
    > dont know how to get the data array when I fetch the binary string
    > from database.
    >
    > My question is:
    > How to transform the binary string into data array? which vi's should
    > I use? I have tried unflatten from string but failed.
    In order to use Unflatten from string you first need to Flatten it
    before writing it. Also depending on the database driver, the returned
    data may actually not be binary but Hexadecimal encoded ASCII which you
    would first have to decode to binray.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

Maybe you are looking for

  • Send error report? No! I just want my music!

    "iTunes has encountered a problem and needs to close. We are sorry for the inconvenience." Every time i click on iTunes it asks me if i want to send an error report. I doesn't even tell me what type of error it's having.I tried reinstalling iTunes an

  • How do I authorize my computer? I can not find the "Authorize This Computer" option anywhere.

    PLEASE READ ALL EMAIL. ANYONE THAT CAN HELP WOULD BE GREATLY APPRECIATED. As you read through the emails, you will see that "C" the customer service person responds the same way. All the emails are from the same thread.  I would reply to his email, h

  • Problem with WT2007, SBO2005 and Opportunities

    I am trying to synch opportunities between WebTools 2007 PL3 and SBO 2005 PL31 but every opportunity errors with the following error: -5002:Potential amount is missing  [OPR1.MaxSumLoc][line: 3]    at NetPoint.SynchSBO.SBOObjects.SBOOpportunity.NetPo

  • IMac-Green light nothing more....

    I work for a large school district and am having the same issue with several iMac machines. I get a green light and nothing more, no chime, no HD activity, nothing... Here is what I have done. Reset PMU, changed battery, swapped with known good RAM,

  • Visual Source Safe & Forte

    Hello happy users ! Doe's anyone use Visual Source Safe with Forte ? I saw something about it some month ago but i'm unable to retrieve it... I remember someone has writed a Forte project allowing to automatically archiving source file in VSS while i