Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

How to use the currentTimeMillis() method in java

  • 17-12-2004 2:45pm
    #1
    Moderators, Society & Culture Moderators, Sports Moderators Posts: 12,325 Mod ✭✭✭✭


    could someone post up a bit of code illustrating how exactly to use this method or alternatively if there is a mthod in java that just returnd the time in hours and minutes could you post that up instead. Thanking you

    Patrick


Comments

  • Registered Users, Registered Users 2 Posts: 597 ✭✭✭bambam


    Date today;
    String dateOut;
    DateFormat dateFormatter;
    dateFormatter = DateFormat.getDateInstance(DateFormat.DEFAULT);
    today = new Date();
    dateOut = dateFormatter.format(today);
    System.out.println("Date : " + dateOut + " " );


    // calling new Date() gives you a date as of 'now'.


  • Moderators, Society & Culture Moderators, Sports Moderators Posts: 12,325 Mod ✭✭✭✭Kingp35


    nice one worked perfectly


Advertisement