Re: [datetime SELECT on DB] datetime questino

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ben,

This may not be the most orthodox way of doing, but I remember it worked for
me on a project I had to a while ago.

Try this:

SELECT * FROM yourtable WHERE dateTimeField LIKE '2003-04-22%'

Hope that helps.

-Jake


"Ben9000" <ben9000@gmx.net> wrote in message
200304221801.11691.ben9000@gmx.net">news:200304221801.11691.ben9000@gmx.net...
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello dear list,
>
> I have a column of type datetime in my DB. This means a date AND the
> time r stored.
>
> I want to search only for a date "2003-04-23" how can I build SELECT
> query which finds all entries with the right date (and leaving out
> the time)?
>
> Somehow I m stuck in this, well I guess its easy - as always - and
> simple - as always - but right now It seems I ve to SELECT all
> entries and filter the strings in PHP :(
>
> Thx for ur help!
> Enjoy the day.
>
> Ben :)
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.1 (GNU/Linux)
>
> iD8DBQE+pWdGROwluvOuI4ARAoNpAJ9TaShZEanq+SO8XWeu+YbG+4HqnACePtZ/
> S7KzO298rDP3pCxSyL2UA2E=
> =FYLS
> -----END PGP SIGNATURE-----
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux