I use '2014-03-01 23:25:03'
On Monday, March 24, 2014 5:26:17 AM UTC+1, advantage+ wrote:
-- On Monday, March 24, 2014 5:26:17 AM UTC+1, advantage+ wrote:
When comparing dates as a value in the query it looks like this
`created` < '2014-03-01 23:25:03'
or
`created` >= '2014-02-23 23:25:03'
Is that the best way? '2014-03-01 23:25:03' does not look numical.
Or is it best to save that created value as strtotime() so you actually have a numerical value.
1393716303 since comparing if something is great / less than seems more appropriate.
I have tried both ways and each worked out exactly the same but just wondering which would be the best method and why?
Thanks,
Dave
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment