File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Date or Timestamp?
Joined: Aug 05, 2007
Nov 16, 2009 15:19:22
I have a table column that stores Date in default format 'dd-MON-yy'
I use JDBC to retrieve this column but I need it to display hour and minute and am/pm for my struts 2 app.
I am wondering if I should change the column to Timestamp instead of Date, does Timestamp record more info down to hour and minute compare to Date type?
Thanks in advance
author & internet detective
Joined: May 26, 2003
Nov 16, 2009 15:51:21
You are correct. Timestamp stores both date and time in a database. Date stores just date.
OCA 8 book
How To Ask Questions The Smart Way
Blogging on Certs:
SCEA Part 1
Part 2 & 3
Core Spring 3
TOGAF part 1
I agree. Here's the link:
subject: Date or Timestamp?
Passing date and time using Timestamp.
ORA-01861: literal does not match format string
How to display date in Daylight Savings
hours and minutes set/get sql timestamp
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015