Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

query dates without milisecond

Status
Not open for further replies.

manjeman

Programmer
Mar 25, 2003
2
MY
hello all, i am having problem on how to compare todays date and date in my table.

i just want to select the date which is with format YYYY-MM-DD but in my oposted_date field is stored timestamp date - '003-03-11 14:29:34+08'

my query is :

dateString='2003-03-24';
String query=" select id, oposted_date from offer where oposted_date='"+dateString+"' ";

can anybody give me a suggestion on how to make oposted_date same formate as dateString ?

thanx in advance..
 
if you don't care about ms at all, declare your field to be timestamp(0) instead of timestamp. otherwise you'll have to use to_char or to_date.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top