Skip to content

Commit 5f471f6

Browse files
committed
Merge branch 'azure-1.11' into azure-2.0
2 parents fc3aea0 + 09282c9 commit 5f471f6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sql_server/pyodbc/operations.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ def convert_uuidfield_value(self, value, expression, connection):
104104

105105
def date_extract_sql(self, lookup_type, field_name):
106106
if lookup_type == 'week_day':
107-
return "DATEPART(dw, %s)" % field_name
107+
return "DATEPART(weekday, %s)" % field_name
108+
elif lookup_type == 'week':
109+
return "DATEPART(iso_week, %s)" % field_name
108110
else:
109111
return "DATEPART(%s, %s)" % (lookup_type, field_name)
110112

0 commit comments

Comments
 (0)