Jun
5
Mssql_Table Behavior for CakePHP 1.2.x
June 5, 2007 - 10:35pm | 4 comments
I've been using CakePHP 1.2.x for projects at work, where our primary database back-end is Microsoft SQL Server. Maybe I'm just missing something, but it seems to me that SQL Server outputs datetime values in an odd way (by odd, I mean not parsable by strtotime). When pulling datetime values out of SQL Server, CakePHP will render them as PHP strings just as they are returned from the server, in this format:
Jan 10 2008 12:25:07:000PM
Now, strtotime parses incoming values according to GNU Date Input Format, which is incompatible with the output from SQL Server (note the milliseconds). To make life easier when working woth models that describe MSSQL tables with datetime fields, using this behavior can make things a little easier.
Recent comments
8 weeks 5 days ago
12 weeks 23 hours ago
16 weeks 5 days ago
17 weeks 4 days ago
21 weeks 4 days ago
31 weeks 3 days ago
31 weeks 6 days ago
50 weeks 5 days ago
1 year 2 weeks ago
1 year 12 weeks ago