Hey there! any question in your mind? Ask It Now!.

Popular Categories





get date in string format

+7 votes
566 views
asked in Programming by neha (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();

1 Answer

+1 vote
answered by Kaperly (1,610 points)
selected by neha
 
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.

commented by neha (560 points)
thanks Kaperly!

Related Questions

0 votes
1 answer 9,830 views
+6 votes
1 answer 1,629 views
+2 votes
2 answers 788 views
+2 votes
1 answer 505 views
+1 vote
1 answer 776 views
+3 votes
1 answer 643 views
–1 vote
0 answers 111 views
+3 votes
2 answers 1,831 views
asked in Programming by krish Expert (6,310 points)
0 votes
1 answer 149 views

Not a Member yet?

Ask to Folks Login

My Account
863 Folks are online
81 members and 782 guest online
Your feedback is highly appreciated