Link Details

Link 19496 thumbnail
User 192137 avatar

By pashimito
via thunderguy.com
Published: Apr 21 2007 / 05:38

java.sql.Date stores only date information, not times. Simply converting a java.util.Date into a java.sql.Date will silently set the time to midnight.
  • 10
  • 1
  • 2958
  • 371

Comments

Add your comment
User 226234 avatar

aleafs replied ago:

0 votes Vote down Vote up Reply

thanks for share, useful site!

User 107114 avatar

daniel replied ago:

0 votes Vote down Vote up Reply

Uh, yeah, that's why we have java.sql.Timestamp and not just Date. :-) You'll notice that the actual SQL data types are different too (DATETIME and TIMESTAMP).

User 111696 avatar

bloid replied ago:

0 votes Vote down Vote up Reply

In other news, water is wet...

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (10)



Voters Against This Link (1)