In meinem Blatt hat Zellen Daten im TT-MM-JJJJ-Format und ich verwende diese Datum für SQL-Abfrage, die Datumsformat in JJJJ-MM akzeptieren DD-Format. für die i Daten yyyy-mm-dd Format an Umwandlung wie folgt: -Datumsformat von TT-MM-JJJJ in JJJJ-MM-TT ändern
Dim startDate As Date, endDate As Date
startdate = Format(Sheet1.Range("b1").Value, "yyyy-mm-dd")
endDate = Format(Sheet1.Range("c1").Value, "yyyy-mm-dd")
aber ich startdate und enddate in dd-mm-yyyy-Format erhalten. Warum ???? jeder Vorschlag ... Da ich neu zu VBA bin, ignorieren Sie bitte meine dummen Fehler wenn überhaupt. danke im voraus ....