Results 1 to 5 of 5
  1. #1
    gibsonsydsa is offline Member
    Join Date
    Feb 2008
    Location
    South Africa
    Posts
    9
    Rep Power
    0

    Default DateField in format : HH:mm:ss:ms

    Hi Guys,

    Im busy working on a project where I need to capture the current time as soon as a user presses a button, the problem is that in MIDP 2.0 the DateField only accepts time to the minute as soon as you click "save" it displays time in this format : 12:01:00. I need a custom control that allows me to set the time in the following format : 12:01:10:54 (Hours: Minutes: Seconds: Milliseconds)...

    Is this at all possible as I have done extended searches on both google and other forums for a solution without any success.

    Gib

  2. #2
    gibsonsydsa is offline Member
    Join Date
    Feb 2008
    Location
    South Africa
    Posts
    9
    Rep Power
    0

    Default

    Is there seriously no-one out there that can help me with this poblem?

  3. #3
    sk_shadul is offline Member
    Join Date
    Mar 2008
    Posts
    5
    Rep Power
    0

    Default

    Hi,

    It is not possible to do what you want with the DateField class.

    Regards,
    sk_shadul

  4. #4
    gibsonsydsa is offline Member
    Join Date
    Feb 2008
    Location
    South Africa
    Posts
    9
    Rep Power
    0

    Default

    Yip thanks I realised that it was impossible to do so so I drew on a canvas.It works I had to do it in a hurry so don't hesitate to revise the code for optimization if you need to, im sure there is room for improvement.

    The code is attached as timer.zip
    Attached Files Attached Files

  5. #5
    gibsonsydsa is offline Member
    Join Date
    Feb 2008
    Location
    South Africa
    Posts
    9
    Rep Power
    0

    Default

    Sorry for the double post I forgot to mention that I only had to go up to HH:MM:SS in the end its obviously possible to extend it to milliseconds if you need to.

    Cheers,
    Gib

Similar Threads

  1. How to format the date in particular pattern
    By Java Tip in forum java.text
    Replies: 0
    Last Post: 04-04-2008, 02:35 PM
  2. Timestamp in SQL format
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 02-10-2008, 11:37 AM
  3. Code format
    By Eric in forum XML
    Replies: 1
    Last Post: 07-06-2007, 07:44 AM
  4. Code format
    By Eric in forum XML
    Replies: 1
    Last Post: 07-06-2007, 07:42 AM
  5. show a RTF FORMAT
    By Jack in forum Advanced Java
    Replies: 2
    Last Post: 07-04-2007, 03:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •