Forum Moderators: open

Message Too Old, No Replies

MYSQL Query to Find records within a time range

MYSQL Query

         

thangavel

10:47 am on May 12, 2006 (gmt 0)



Hi All,

I am inneed to fetch records within a Time range in MYSQL database Server.

In my table there is a field called tempTime as Date as data type. For Ex. the value is 10:00 . While i am running the query it has the take the Server Time (For Ex. 12) and fetch the records between the time range of 9:00 to 12:00.

Please guide me in this.

Thanks in advance
Thangavel

coopster

12:13 pm on May 12, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, thangavel.

In my table there is a field called tempTime as Date as data type.

The

DATE
type is used when you need only a date value, without a time part. Are you sure you are going to be able to retrieve time values? It seems to me there is not going to be any time portion in your stored value. Or am I missing something?