If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > How to query the datetime field in MySQL

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-05-10, 05:57
rosmiq rosmiq is offline
Registered User
 
Join Date: Feb 2010
Posts: 3
Red face How to query the datetime field in MySQL

Hi, I am very new to MySQL. I normally work with MS SQL. I am querying a MySQL database via .NET Visual Studio 2005.

I have a MySQL database which has a datetime field, I am basically trying to retrieve rows that are 24 hours old. i.e need to retrieve yesterday's data.

I am having real difficulty in finding this where statement.

Can somebody please help?

Thanks
Reply With Quote
  #2 (permalink)  
Old 02-05-10, 08:32
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,525
please check da manual under Date and Time functions

if you have trouble choosing the correct function, you may post again
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Tags
datetime, mysql, yesterday

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On