I am trying to get the Date as a string formatted yyyy-mm-dd
.
I have tried various things with strange results:
Dim mydate As String
mydate = Date
mydate = Year(Date)
mydate = Month(Date)
mydate = Day(Date)
- The first one gives
11/02/
without the year.
I can try to concatenate the data but:
- The second gives the year OK
- However the third gives month as 2 instead of 02
- Similar for fourth.
Any clarification or an example would be very welcome.