大家好,我想問一下要如何更改python code
使python抓到mssql表格內的資料的due_date 限制為今天與明天的日期
ex 2022/08/02和2022/08/03
from sqlalchemy import create_engine
from datetime import datetime
from datetime import timedelta
import pymssql
import pandas as pd
db_eng=create_engine('mssql+pymssql://username:password @server name/MTB_TEST_EE')
query_string='select* from [MTB_TEST_EE].[dbo].[PM_calendar_rawdata] '
result=result[['Ball_Count','Due_Date']]
result
query_string='select* from [MTB_TEST_EE].[dbo].[PM_calendar_rawdata] '
query_string='select* from [MTB_TEST_EE].[dbo].[PM_calendar_rawdata]
Where Due_Date BETWEEN CONVERT(date, GETDATE()) and CONVERT(date, GETDATE()+1)'
雖然不知道你怎麼能抓明天的資料