•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 425,999 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,678 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 4750 | Replies: 1 | Solved
![]() |
•
•
Join Date: Aug 2006
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 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
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
•
•
Join Date: Nov 2004
Location: Netherlands
Posts: 5,752
Reputation:
Rep Power: 18
Solved Threads: 199
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.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
![]() |
•
•
•
•
•
•
•
•
DaniWeb JSP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Display client's PC Date & Time (ASP.NET)
- Help me with DtPicker Control (Visual Basic 4 / 5 / 6)
- Program to display System date and Time in VC++ 6.0 (C++)
- How to delete files in UNIX using shell script (Shell Scripting)
- Pointer question (C)
- need help on c++ before friday (C++)
- Comparing and sorting of Dates. (C++)
- New look for the index page (DaniWeb Community Feedback)
Other Threads in the JSP Forum
- Previous Thread: Urgent help required.
- Next Thread: logout problem after sessionivalidate



Linear Mode