NessPJ
Active Member
- Joined
- May 10, 2011
- Messages
- 431
- Office Version
- 365
Hello all,
I'm using the following code to put a Date/Time in some cells:
For yesterday, the result of this code is: 04-12-18 12:00 while according to our standards (I'm from the Netherlands),
i expected it to be: 12-04-18 12:00.
If i run the code again right now, it will show: 13-04-18 12:00.
The day and month values are switched, showing the format i would expect.
How can i correct the notation for the first 12 days of every month? Why does this happen?
I'm using the following code to put a Date/Time in some cells:
Code:
Public Const TargetSht As String = "Info"
Sheets(TargetSht).Range("J10").Value = Format(Now, "DD-MM-YY HH:MM")
For yesterday, the result of this code is: 04-12-18 12:00 while according to our standards (I'm from the Netherlands),
i expected it to be: 12-04-18 12:00.
If i run the code again right now, it will show: 13-04-18 12:00.
The day and month values are switched, showing the format i would expect.
How can i correct the notation for the first 12 days of every month? Why does this happen?