MySql week() method equivalent

Поиск
Список
Период
Сортировка
От Vaduvoiu Tiberiu
Тема MySql week() method equivalent
Дата
Msg-id 729759.62026.qm@web51303.mail.re2.yahoo.com
обсуждение исходный текст
Ответы Re: MySql week() method equivalent  ("Greg Sabino Mullane" <greg@turnstep.com>)
Список pgsql-novice
I have a bit of a problem replacing the week() method from mysql in some of my queries. The equivalent function for week($date) would be "extract week from $date". All good until I found a mysql query where the week function is called with the second parameter like this: select week(date,3). Based on mysql site, second parameter means that : "Week 1 is the first week with more than 3 days this year(for second parameter=3)". I made a couple of tests with some dates on both mysql and postgresql and noticed that "select week(date,3)" and extract(week from date) sometime returns different values. Anyone has any ideea for a workaround on this issue??

Thanks

В списке pgsql-novice по дате отправления:

Предыдущее
От: Matthew Walden
Дата:
Сообщение: Re: Debugging PostgreSql queries
Следующее
От: "Greg Sabino Mullane"
Дата:
Сообщение: Re: MySql week() method equivalent