Try the following:
Sub Test()
Dim lr As Long
Dim rng As Range
With Sheet1 'Change according to your sheet's codename
lr = .Cells(.Rows.Count, "A").End(xlUp).Row 'Change "A" to whichever column data is in
Set rng = .Range("A1:A" & lr) 'Change accordingly again
rng.TextToColumns Destination:=rng, DataType:=xlFixedWidth, FieldInfo:=Array(0, xlDMYFormat)
rng.NumberFormat = "YYYY-MM-DD"
End With
End Sub
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…