System Time

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nickburton
    New Member
    • Oct 2008
    • 2

    System Time

    (I tried searching for an existing thread on this topic but I kept getting a blank screen or a Bytes database error.... )

    How do I access system time? I am playing around with the SimpleDateForma t class and want to utilise the current time. (I know in Excel it would be =now() but this is Java!)

    Thanks in advance,

    Nick
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by nickburton
    How do I access system time? I am playing around with the SimpleDateForma t class and want to utilise the current time. (I know in Excel it would be =now() but this is Java!)
    Have a look at the static method System.currentT imeMillis(). It gives you the current time since midnight January 1st, 1970, measured in ms.

    kind regards,

    Jos

    Comment

    • hsn
      New Member
      • Sep 2007
      • 237

      #3
      hello there
      i have a solution for you
      check out the calender class it will be very useful you can use it to check the date and the time.

      best regards
      hsn

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        Originally posted by hsn
        hello there
        i have a solution for you
        check out the calender class it will be very useful you can use it to check the date and the time.

        best regards
        hsn
        See Jos' reply above.

        Comment

        Working...