TheRedCardinal
Board Regular
- Joined
- Jul 11, 2019
- Messages
- 243
- Office Version
- 365
- 2021
- Platform
- Windows
Hi all,
I've not come across this before so I'm a bit stumped.
The basics of my code is that it loads a range from a worksheet into an array, manipulates the data in that array and converts it into another array, and that outputs that second array to another worksheet.
All cells in the target worksheet are formatted as text, mainly to maintain leading zeroes in some of the columns.
2 of the columns contain dates. They are in the UK format in the source data (DD/MM/YYYY).
When my code runs, they are output in the US format (MM/DD/YYYY).
When I debugged the program, I noticed that the dates in each column are shown in the Locals window as surrounded by # symbols:
#03/08/2020#
#04/08/2020#
This is true in BOTH the source array and output array.
The output is switching around the DD and MM data - rather than just allocating the wrong fields.
Example:
Source data = 03/08/2020
In Locals in the arrays = #03/08/2020#
Output in Text on worksheet = 08/03/2020
All my localisations are UK based.
What is going on here?
I've not come across this before so I'm a bit stumped.
The basics of my code is that it loads a range from a worksheet into an array, manipulates the data in that array and converts it into another array, and that outputs that second array to another worksheet.
All cells in the target worksheet are formatted as text, mainly to maintain leading zeroes in some of the columns.
2 of the columns contain dates. They are in the UK format in the source data (DD/MM/YYYY).
When my code runs, they are output in the US format (MM/DD/YYYY).
When I debugged the program, I noticed that the dates in each column are shown in the Locals window as surrounded by # symbols:
#03/08/2020#
#04/08/2020#
This is true in BOTH the source array and output array.
The output is switching around the DD and MM data - rather than just allocating the wrong fields.
Example:
Source data = 03/08/2020
In Locals in the arrays = #03/08/2020#
Output in Text on worksheet = 08/03/2020
All my localisations are UK based.
What is going on here?