datetime v mysql
Tom Hudec
Tom na ABBA.cz
Pondělí Květen 6 04:44:14 CEST 2002
Tom Hudec wrote:
> Tom Hudec wrote:
>
>> Petr Vanek wrote:
>> mysql> select id from articles where DATE_FORMAT(dt,'%Y-%m-%d') =
>> '2002-05-05';
>
>
> Jeste me napadlo mozna cistsi reseni:
>
> select id from articles where sdate between
> '2002-05-05' and '2002-05-05' + INTERVAL '23:59:59' HOUR_SECOND;
Uz mi to v tuto dobu nemysli, lepe samozrejme takto:
select id from articles where sdate between
'2002-05-05' and '2002-05-05 23:59:59';
Predchozi navrh se da pouzit v pripade, ze '2002-05-05' neni retezec.
--
Tom Hudec <Tom(at)ABBA.cz>, editor of Tom's ABBA pages http://ABBA.cz/
.''`. The box said Windows, NT or better, so I installed Linux. :-)
: :' :
`. `' Debian GNU/Linux http://www.debian.org/ http://www.debian.cz/
`- The Perfect OS - the most software, the most people
Další informace o konferenci Test