aspose file tools*
The moose likes Servlets and the fly likes system date Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "system date" Watch "system date" New topic
Author

system date

mou haj
Ranch Hand

Joined: Sep 12, 2001
Posts: 81
how can i take out system date in java in any specified formatsay yyyymmdd or yy/mm/dd etc ... the format will be dynamic.Please help
Thanks
Moumita
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Use the java.text.SimpleDateFormat class. For example:
------------------
Miftah Khan
- Sun Certified Programmer for the Java� 2 Platform
- Sun Certified Web Component Developer for the Java� 2 Platform, Enterprise Edition
[This message has been edited by Miftah Khan (edited October 01, 2001).]
mou haj
Ranch Hand

Joined: Sep 12, 2001
Posts: 81
hi miftaf im getting the following error
------------------
reference to Date is ambiguous, both class java.util.Date in java.util and class java.sql.Date in java.sql match
probably occurred due to an error in /E-Recon/uploadsqltest.jsp line 41:
------------------------------------------
Please help
Moumita
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Either use "new java.util.Date()" instead of "new Date()", or include the following import statement in your code: "import java.util.Date;".
------------------
Miftah Khan
- Sun Certified Programmer for the Java� 2 Platform
- Sun Certified Web Component Developer for the Java� 2 Platform, Enterprise Edition
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: system date
 
Similar Threads
JSP is recompiling on every request
Friday the 13th
System Date
Regarding the date obtained using java.util.Date class
How to get tomorrow's date?