#253438 hannibal-00702.01.2011, 19:54:24 (editiert von hannibal-007, 02.01.2011, 19:59:07) |
MySQL: date_format Problem (ed) (pc.coding) |
Hi CREATE TABLE IF NOT EXISTS `system__appointment_entries` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
`creation_date` datetime NOT NULL,
`author` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
`description` longtext COLLATE utf8_unicode_ci NOT NULL,
`comment` longtext COLLATE utf8_unicode_ci NOT NULL,
`blog` int(11) NOT NULL,
`email` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
`ip` varchar(12) COLLATE utf8_unicode_ci NOT NULL,
`location` longtext COLLATE utf8_unicode_ci NOT NULL,
`color` int(11) NOT NULL,
`day` int(11) NOT NULL,
KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=72 ;
(70, \'asddas\', \'2011-01-05 18:25:00\', \'\', \'\', \'\', 1, \'\', \'\', \'asdads\', 9, 0)
SELECT *
FROM appointment,
system__appointment_entries
WHERE DATE_FORMAT(system__appointment_entries.creation_date,\'%v\') = \'1\'
ORDER BY system__appointment_entries.creation_date DESC
|
|
#253443 Bard02.01.2011, 20:39:20 @ hannibal-007 |
MySQL: date_format Problem |
> Ich hab ein etwas seltsames Problem: (70, \'asddas\', \'2011-01-05 18:25:00\', \'\', \'\', \'\', 1, \'\', \'\',
> \'asdads\', 9, 0)
SELECT *
> FROM appointment,
> system__appointment_entries
> WHERE DATE_FORMAT(system__appointment_entries.creation_date,\'%v\') = \'1\'
> ORDER BY system__appointment_entries.creation_date DESC
|
|
#253446 hannibal-00702.01.2011, 20:53:21 @ Bard |
MySQL: date_format Problem |
Du spielst auf die Defintion von der KW 1 an, entweder ab 1.1 oder ab dem ersten Montag in neuen Jahr. |
|
#253481 Bard02.01.2011, 23:22:04 @ hannibal-007 |
MySQL: date_format Problem |
> Week() bringt mich leider nicht weiter, weil ich kein Datum hab. |
|
#253483 hannibal-00702.01.2011, 23:27:29 @ Bard |
MySQL: date_format Problem |
Eine For Schleife wo ich die Kalenderwochen hochzähle. |
|
#253492 Bard03.01.2011, 01:01:16 @ hannibal-007 |
MySQL: date_format Problem |
> Eine For Schleife wo ich die Kalenderwochen hochzähle. |