以美国格式访问Excel VBAdate

我试图从Excel VBA中运行Excel中的variables查询,但Access将我的date转换为美国格式:

Sub upload() Last = ActiveSheet.UsedRange.Rows.Count Dim LastOrderDate As Date Dim LastOrderDateYear As Integer Dim LastOrderDateMonth As Integer Dim LastOrderDateDay As Integer FirstOrderDate = Range("D" & Last) FirstOrderDDate = DateSerial(Year(FirstOrderDate), Month(FirstOrderDate), Day(FirstOrderDate)) 'Import Data to Benji's Ecommerce Database ssheet = Application.ActiveWorkbook.FullName Set acApp = CreateObject("Access.Application") acApp.OpenCurrentDatabase ("X:\ECommerce Database.accdb") acApp.Visible = True acApp.UserControl = True acApp.DoCmd.RunSQL "DELETE * FROM [OrdersDetailed] WHERE [OrderDate] >= #" & FirstOrderDDate & "#" acApp.CloseCurrentDatabase acApp.Quit Set acApp = Nothing End Sub 

因此,例如,2017年3月1日的variables2017年1月3日之前使用2017年3月1日以后的所有数据,而不是2017年3月1日。

我已经在我的电脑上查看了我的date显示设置,而据我所看到的我的地区是英国和date格式是英国,我从来没有见过美国风格date在我的计算机上!

这里发生了什么,我该如何解决?

谢谢,

石磊