This is the code i am using currently
This is at the top of the code just under the start (by the way, i have the necessary imports for this to work so please dont respond saying they arent there and that it wont work)
DateFormat dateFormat = new SimpleDateFormat("MMM/dd/yyyy hh:mm:ssa");
Calendar cal = Calendar.getInstance();
And then this is what i was using in the code to generate the date/time but it wont work the way i want it to.
dateFormat.format(cal.getTime())
So what i wanted to do was put it into it's own method so that it could be run whenever it was needed and would generate the current time when used, not the time that the program was first run. Would i use the existing code and just put it all into the method, or would i use something different for that?

New Topic/Question
Reply



MultiQuote





|