> Sorry, I've looked into java.util &
> java.text.SimpleDateFormat package but I'm still
> confused.
>
> How do I use these packages to grab Current System
> Date/Time?
When you create a new instance of java.util.Date, it automatically has the current system time.
- Adam
if you're formatting requirement isn't strict and you don't want to play with the simpledateformatter - just create a new instance of Date and use its toString method - the toString method is overridden to provide a formatted date string (can't remember off the top of my head what the specific format is though).
import java.text.SimpleDateFormat;
import java.util.Calendar;
.
.
.
.
Calendar cal = Calendar.getInstance();
SimpleDateFormat sdf = new SimpleDateFormat();
sdf.applyPattern("EEEEEE MMM d HH:mm:ss z yyyy");
System.out.println(sdf.format(cal.getTime()));