Created
August 17, 2017 16:57
-
-
Save dafma/422114be15874d665761f603594f3b8c to your computer and use it in GitHub Desktop.
El máximo, mínimo rango de fecha
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sql2 = "Select DATEPART(week,MIN(FechaEntrega)) as SemanaDelYear from Compra where Mov in('Pedido', 'Pedido Excedente') and Estatus='PENDIENTE'" | |
cursor = connection.cursor() | |
cursor.execute(sql2) | |
minsql = cursor.fetchall() | |
minsql = minsql[0].SemanaDelYear | |
maxsql = maxsql[0].SemanaDelYear | |
my_list = list(range(minsql, maxsql)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment