0

Hey again,

Im seriosly having difficulty displaying the current date and time in java/jsp. THis is the code im using to get the date and time:

public static void main(String args[])
   {
       Date date=new Date();
       SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yy");
       String strDate = sdf.format(date);
       System.out.println(""+strDate);
}

but nothing seems to be displaying at all. Am i forgetting something do i still need include something? Please please help!

Thanks

Edited by Reverend Jim: Fixed formatting

2
Contributors
1
Reply
2
Views
11 Years
Discussion Span
Last Post by jwenting
0

this has nothing to do with JSP, or if you put that code in a JSP your understanding of how JSP works is so seriously flawed you should get yourself a beginner's tutorial and start from scratch.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.