Not sure as it is not converting the date,
the data is there, the code is not convert mm/dd/yyyy to dd-mm-yyyy
the problem is if till 12 day of any month the date come as mm/dd/yyyy and as it 13 day of any month then the input file comes as dd-mm-yyyy
so need a code that will fix the to dd-mm-yyyy always.
the data is there, the code is not convert mm/dd/yyyy to dd-mm-yyyy
the problem is if till 12 day of any month the date come as mm/dd/yyyy and as it 13 day of any month then the input file comes as dd-mm-yyyy
so need a code that will fix the to dd-mm-yyyy always.
VBA Code:
Sub datachange()
Application.Wait (Now + TimeValue("0:00:02"))
Range("B2:B80000").TextToColumns Destination:=Range("B2"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _
:=Array(1, 4), TrailingMinusNumbers:=False
Range("B2:B80000").NumberFormat = "dd-mm-yyyy"
End Sub
Book3 | |||
---|---|---|---|
B | |||
1 | CREADTED_DATE | ||
2 | 2/11/2023 | ||
3 | 31-10-2023 | ||
4 | 31-10-2023 | ||
5 | 31-10-2023 | ||
6 | 31-10-2023 | ||
7 | 1/11/2023 | ||
8 | 1/11/2023 | ||
9 | 1/11/2023 | ||
10 | 1/11/2023 | ||
11 | 1/11/2023 | ||
12 | 1/11/2023 | ||
13 | 2/11/2023 | ||
14 | 31-10-2023 | ||
15 | 31-10-2023 | ||
16 | 31-10-2023 | ||
17 | 31-10-2023 | ||
18 | 31-10-2023 | ||
19 | 31-10-2023 | ||
20 | 31-10-2023 | ||
21 | 31-10-2023 | ||
22 | 31-10-2023 | ||
23 | 1/11/2023 | ||
Sheet1 |