Search:

Type: Posts; User: Norm

Search: Search took 0.13 seconds.

  1. Replies
    15
    Views
    1,426

    [SOLVED] Re: Issue with converting a string to a date

    See post#11.
  2. Replies
    15
    Views
    1,426

    [SOLVED] Re: Issue with converting a string to a date

    That is what is returned by the class's default toString() method. You should override the toString method and have it return the String you want to see.
  3. Replies
    15
    Views
    1,426

    [SOLVED] Re: Issue with converting a string to a date

    What was the text of the error?
    What datatype is doh? Does the Calendar class's getTime() method return that type of data?

    You need to use the Calendar class's get() method to get the year,...
  4. Replies
    15
    Views
    1,426

    [SOLVED] Re: Issue with converting a string to a date

    Looks like you need to create a Calendar object, set its time using the Date object, then call the Calendar object's get method to get the year, month and day to create the local Date object.
  5. Replies
    15
    Views
    1,426

    [SOLVED] Re: Issue with converting a string to a date

    I don't have a definition for the local Date class. You have to read the code or the API doc for that class to see how to use it.
    How can anyone make recommendations for using an unknown class?
  6. Replies
    15
    Views
    1,426

    [SOLVED] Re: Issue with converting a string to a date

    If convertedDate is the local Date class, then you can not assign it the value returned by the parse() method which returns a java.util.Date object.

    Yes, that seems right.
    What methods does the...
  7. Replies
    15
    Views
    1,426

    [SOLVED] Re: Issue with converting a string to a date

    Try putting the full package path on the class name so the compiler does not get confused about class definitions: java.util.Date

    Which Date class is convertedDate supposed to be?
Results 1 to 7 of 7