+7 votes
754 views
in Programming by (560 points)

   in my table date is updating in this format 1395133877741 i need to get date in string formata in good format  by which user can understand. 

now code which is i am using 

java.util.Date date= new java.util.Date();

date.getTime();

closed

1 Answer

+1 vote
by (1.6k points)
selected by
 
Best answer

you should use this , its very simple.

java.util.Date date= new java.util.Date();

System.out.println(d.toString());

This will print 

Tue Mar 18 14:41:17 IST 2014

i think this format is usefull for you.

by (560 points)
thanks Kaperly!

Not a Member yet?

Ask to Folks Login

My Account

Your feedback is highly appreciated