hi i have the table in which date valve is like this 11/11/2009 6:08:29 AM how can i compare the value or select them , the to_date is working in SELECT but,i want to select the records using this colmn and by giving value
ie:

SELECT * FROM SENTMAIL WHERE SENTMAIL_SENT_DATE='01-OCT-2011'

this statement is retrieving nothing.

thanks in advance

try this.

SELECT * FROM SENTMAIL WHERE trunc(SENTMAIL_SENT_DATE)='01-OCT-2011'

You can also use

SELECT * FROM SENTMAIL WHERE to_char(SENTMAIL_SENT_DATE, 'fmDD-MON-YYYY')='01-OCT-2011'

thanks the query is working ,but it is taking so much time

What is the volume of data ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.