Merhaba aşağıda yazdığım kodlarda tarih formatı düzgün çalışmadığından sonuç alamıyorum,tecrübeli arkadaşlarımın ve üstadlarımızın yardımına ihtiyacımız var ilgilenenlere şimdiden teşekkürler.
"SELECT LG_009_01_INVOICE.DATE_, LG_009_01_INVOICE.GRPCODE, LG_009_01_INVOICE.TRCODE, LG_009_01_INVOICE.NETTOTAL, LG_009_01_INVOICE.TOTALVAT, LG_009_CLCARD.CODE, LG_009_CLCARD.DEFINITION_, (LG_009_01_I" _
, _
"NVOICE.NETTOTAL-LG_009_01_INVOICE.TOTALVAT) AS 'SONUC'" & Chr(13) & "" & Chr(10) & "FROM FUJI.dbo.LG_009_01_INVOICE LG_009_01_INVOICE, FUJI.dbo.LG_009_CLCARD LG_009_CLCARD" & Chr(13) & "" & Chr(10) & "WHERE LG_009_CLCARD.LOGICALREF = LG_009_01_INVOICE.CLIE" _
, _
"NTREF AND ((LG_009_01_INVOICE.TRCODE Between 1 And 4) AND (LG_009_CLCARD.CODE Like '320%') AND (LG_009_01_INVOICE.DATE_ Between " + Format(Sheets("Sayfa1").Range("G1"), "yyyy-mm-dd") + " And " + Format(Sheets("Sayfa1").Range("G2"), "yyyy-mm-dd") + "))" & Chr(13) & "" & Chr(10) & "ORDER BY LG" _
, "_009_01_INVOICE.DATE_")
.Refresh BackgroundQuery:=False
"SELECT LG_009_01_INVOICE.DATE_, LG_009_01_INVOICE.GRPCODE, LG_009_01_INVOICE.TRCODE, LG_009_01_INVOICE.NETTOTAL, LG_009_01_INVOICE.TOTALVAT, LG_009_CLCARD.CODE, LG_009_CLCARD.DEFINITION_, (LG_009_01_I" _
, _
"NVOICE.NETTOTAL-LG_009_01_INVOICE.TOTALVAT) AS 'SONUC'" & Chr(13) & "" & Chr(10) & "FROM FUJI.dbo.LG_009_01_INVOICE LG_009_01_INVOICE, FUJI.dbo.LG_009_CLCARD LG_009_CLCARD" & Chr(13) & "" & Chr(10) & "WHERE LG_009_CLCARD.LOGICALREF = LG_009_01_INVOICE.CLIE" _
, _
"NTREF AND ((LG_009_01_INVOICE.TRCODE Between 1 And 4) AND (LG_009_CLCARD.CODE Like '320%') AND (LG_009_01_INVOICE.DATE_ Between " + Format(Sheets("Sayfa1").Range("G1"), "yyyy-mm-dd") + " And " + Format(Sheets("Sayfa1").Range("G2"), "yyyy-mm-dd") + "))" & Chr(13) & "" & Chr(10) & "ORDER BY LG" _
, "_009_01_INVOICE.DATE_")
.Refresh BackgroundQuery:=False