I am working on a macro in which through a form and a text box called
fechasolicitudreq . I'm saving the dates in the corresponding cells.
I have tried the following formats:
Cells(i,j).Value = Me.fechasolicitudreq.Value
Cells(i,j).Value = Format(Me.fechasolicitudreq.Value, "Short Date")
Cells(i,j).Value = Format(Me.fechasolicitudreq.Value, "dd/mm/yyyy")
But the following happens to me:
- If date is 10/01/2017 in the box you type 1/10/2017
- If date is 01/13/2017 in the box you type 01/13/2017
What's more, the big dilemma is that the results of the functions
Day() are also affected. For tests performed, the
dd is assigned as day if this is greater than 12 , but otherwise, it is assigned as month (and that it is appreciated in the functions).
I wish I could give it the date format in Spanish, but in case it does not, at least the functions
Month() are coherent, to be able to use that information.
Note: I have also tried to concatenate an empty string, but automatically change it to