Romulo Avila
02-14-2017, 06:11 AM
Good Morning,
I have a problem, I have in the worksheet in cell "A1" a date "14/02/2017", I need inside VBA that this value be loaded in the variable in the format "yyyy-mm-dd", but in the way that I know I can not, it only appears dd / mm / yyyy, how should I proceed?
Sub test()
Dim InvoiceDate As Date
InvoiceDate = Format(Range("A1").Value, "YYYY-MM-DD")
Range("B10") = InvoiceDate
End Sub
Thanks for the support
I have a problem, I have in the worksheet in cell "A1" a date "14/02/2017", I need inside VBA that this value be loaded in the variable in the format "yyyy-mm-dd", but in the way that I know I can not, it only appears dd / mm / yyyy, how should I proceed?
Sub test()
Dim InvoiceDate As Date
InvoiceDate = Format(Range("A1").Value, "YYYY-MM-DD")
Range("B10") = InvoiceDate
End Sub
Thanks for the support