Re: Incorrect DATE_FORMAT output for weeks with year e.g. '%v-%y'

2002-11-21 Thread Andy Bakun
I don't know about "incorrect", but confusing, sure. It is easy to predict what is going to be returned based on the documentation. On Thu, 2002-11-21 at 14:19, Joe Siegrist wrote: > I don't agree that mysql is 'right' here though, I realize that if you > simply strip out the year for the date i

Re: Incorrect DATE_FORMAT output for weeks with year e.g. '%v-%y'

2002-11-21 Thread Joe Siegrist
>> PHP handles this correctly -- if I do a date("W-y", $date) >> for '2001-12-31' >> I get '01-02', but in mysql you get the wrong year: '01-01' > >I don't know where you got this data from, but the second number would be the year, that means mysql is showing the right year and php is showing the

RE: Incorrect DATE_FORMAT output for weeks with year e.g. '%v-%y'

2002-11-21 Thread Luc Foisy
> PHP handles this correctly -- if I do a date("W-y", $date) > for '2001-12-31' > I get '01-02', but in mysql you get the wrong year: '01-01' I don't know where you got this data from, but the second number would be the year, that means mysql is showing the right year and php is showing the wr

Incorrect DATE_FORMAT output for weeks with year e.g. '%v-%y'

2002-11-21 Thread Joe Siegrist
Mysql gives what I'd call incorrect output when outputing week and years at the end of the year. PHP handles this correctly -- if I do a date("W-y", $date) for '2001-12-31' I get '01-02', but in mysql you get the wrong year: '01-01' Here's the an example (the second one is not what I'd expect):