I have one table...in which data is stored along with date and time...i want to retrieve the data based on current date..
But as in table data is stored with date time...I am unable to retrieve it...Please help me out ...ITs urgent!!!
i am writing query....Select * from securities where updatedfields='curdate()' but in updated fields data is stored like 2011-8-18 10:55:14 in this format i want to retrieve the data based on date.
If you want to select those rows which are updated today, then why don't you use "updatedfields = sysdate"? I assume that the datatype of updatedfields is DATE.
I am no expert in MYSQL ( I think your DB is MYSQL since Oracle doesn't have a DATETIME datatype), this is what I came up after referring to mySQL manual.
Where test is a table and it has test column of datatype datetime.