我不知道如何在 matlab 中将日期传递给我的 sql 查询。当我“静态地”这样做时,它工作得非常好:
myquery1 = ['Select DeliveryMonth, Value '...
' FROM [mydatabase] '...
' where idcurve = 33 ' ...
' and deliverymonth <''20121130'' '...
' order by DeliveryMonth ']
但我想要的是这样的:
breakdate = input('Enter a breakdate as 20121130: ', 's')
myquery1 = ['Select DeliveryMonth, Value '...
' FROM [mydatabase] '...
' where idcurve = 33 ' ...
' and deliverymonth < ''breakdate'' '...
' order by DeliveryMonth ']
问候A