working with a date

This is a discussion on working with a date within the MySQL Database forums, part of the Database Forums category; I'm wanting to return all the data from my database for an exact date. My date field is a ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-04-2007
Auddog
 
Posts: n/a
Default working with a date

I'm wanting to return all the data from my database for an exact date. My
date field is a timestamp. Here is the code that I have been trying to use:

select * from production where date like '2007-05-30';

or

select * from production where date = '2007-05-30';

Thanks for any help that you can provide.

A


Reply With Quote
  #2 (permalink)  
Old 06-04-2007
Captain Paralytic
 
Posts: n/a
Default Re: working with a date

On 4 Jun, 15:49, "Auddog" <wil...@hotmail.com> wrote:
> I'm wanting to return all the data from my database for an exact date. My
> date field is a timestamp. Here is the code that I have been trying to use:
>
> select * from production where date like '2007-05-30';
>
> or
>
> select * from production where date = '2007-05-30';
>
> Thanks for any help that you can provide.
>
> A


Look at:
http://dev.mysql.com/doc/refman/5.0/...on_date-format

Reply With Quote
Reply


Thread Tools
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

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



All times are GMT +1. The time now is 07:44 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0