wood burning stoves 2.0*
The moose likes JDBC and the fly likes How to select time stamp data as date Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to select time stamp data as date" Watch "How to select time stamp data as date" New topic
Author

How to select time stamp data as date

M Wilson
Ranch Hand

Joined: May 23, 2010
Posts: 32
I would like to know how in my sql to select the date part of a time stamp date?
For example:
select REF_NO, STAT_CD, DATE_TS
FROM TABLE

The result of this returns DATE_TS = 2011-01-24 08:45:19.977
How can my sql return just the 2011-01-24 part of it?

Thank you very much.
Tom Reilly
Rancher

Joined: Jun 01, 2010
Posts: 618
Try Googling mysql Date(). Please respond if you need more information.
 
 
subject: How to select time stamp data as date
 
Similar Threads
how to convert gregoriancalendar obj to sqldate?
java.sql.Timestamp question
problem while inserting date field in oracle data base
getting last row
Passing Date in Callable Statement