DateSerial(year,month,day) returns a date. DateSerial(2015,1,30) returns 1/30/2015.What is the reverse of CLng? I have dateserial in VBA and would like to convert it to a Date. Note the dateserial is in VBA not in Excel.
Thanks in advance.
Thanks JoeMo. I my VBA I use Date which gives me 1/30/2015. The code randomly picks a date no more than 90 days prior but the result is in DateSerial (i.e. 41963). How do I convert that back to a date format in VBA?
Sub test()
x = 41963
MsgBox x
x = Format(x, "mm/dd/yyyy")
MsgBox x
End Sub