Re: Find between char field
Date: Tue, 26 Apr 2016 20:56 +0200
Message-ID: <1559671.CWhrnJSDxi_at_PointedEars.de>
Stefan Ram wrote:
> +---------+
> | A |
> +---------+
> | 01/2016 |
> | 02/2016 |
> | 03/2016 |
> | 04/2016 |
> +---------+
> 4 rows in set (0.00 sec)
>
> E non dimenticate le regole della normalizzazione:
> Ogni valore (cella) dev'essere /atomica/!
(“And do not forget the rule of normalization: Each value (cell) must be /atomic/!”)
But this does not apply to dates. There are very few instances where a *date* should be ripped apart; in most cases this is a *misguided* attempt at normalization.
For dates, it is a lot better to use a data type (here: DATE or DATETIME) or string format (here: “YYYY-MM” as per ISO 8601) that can be sorted as it is. How a date (or data, in general) is presented should be considered separately from how it is stored.
-- PointedEars Zend Certified PHP Engineer <http://www.zend.com/en/yellow-pages/ZEND024953> | Twitter: _at_PointedEars2 Please do not cc me. / Bitte keine Kopien per E-Mail.Received on Tue Apr 26 2016 - 20:56:20 CEST