Hello all,
I am trying to get a particular date in the format of yyyy-mm-dd, but no matter what I do VBA returns mm/dd/yyyy. Any ideas why this would occur?
Dim DateVariable As Date
Worksheets("Sheet1").Activate
DateVariable = Cells(2, "B").Value
DateVariable = Format(DateVariable, yyyy - mm - dd)
I am trying to get a particular date in the format of yyyy-mm-dd, but no matter what I do VBA returns mm/dd/yyyy. Any ideas why this would occur?
Dim DateVariable As Date
Worksheets("Sheet1").Activate
DateVariable = Cells(2, "B").Value
DateVariable = Format(DateVariable, yyyy - mm - dd)
Last edited: