How to get the current date in JAVA

Reply

Join Date: Jul 2006
Posts: 6
Reputation: KilluaX is an unknown quantity at this point 
Solved Threads: 0
KilluaX KilluaX is offline Offline
Newbie Poster

How to get the current date in JAVA

 
0
  #1
Jul 28th, 2006
Hi, all

Can anybody tell me how to get the current date in a java program?

And, I want to insert the date into a database with a date/time format, is there any difference from insert a string?


thanks for reply
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,177
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 479
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is online now Online
Code tags enforcer

Re: How to get the current date in JAVA

 
0
  #2
Jul 29th, 2006
to get date and time check this tutorial

and here you can find all you need about manipulating date/time in MySQL
date/time type

sorry couldn't help you more with previous problem been away, but looks like you sorted out :cheesy:
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 6
Reputation: KilluaX is an unknown quantity at this point 
Solved Threads: 0
KilluaX KilluaX is offline Offline
Newbie Poster

Re: How to get the current date in JAVA

 
0
  #3
Jul 30th, 2006
thanks, guy you are really kind
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,177
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 479
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is online now Online
Code tags enforcer

Re: How to get the current date in JAVA

 
0
  #4
Jul 30th, 2006
lol not kind, i'm just giving you tips where I go when I run out of ideas/get desperate etc. If you know what you are looking for it is not so bad to locate it on internet

good luck with your project
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC