frioux / DBIx-Class-Helpers

https://metacpan.org/pod/DBIx::Class::Helpers
20 stars 38 forks source link

DateMethods1 returns week number for day_of_week under MSSQL #92

Open andrewgregory opened 6 years ago

andrewgregory commented 6 years ago

It uses DATEPART with ISO_WEEK which returns the week number, not the day of the week. See https://docs.microsoft.com/en-us/sql/t-sql/functions/datepart-transact-sql?view=sql-server-2017#isoweek-datepart