Is it possible to manipulate the components (year, month, day) of a date in VBA? I'd like a function that, given a day, a month, and a year, returns the corresponding date.
+3
A:
DateSerial(YEAR, MONTH, DAY)
would be what you are looking for.
DateSerial(2008, 8, 19)
returns 8/19/2008
Swati
2008-09-18 04:02:27
+1
A:
You want DateSerial:
Dim someDate As Date = DateSerial(year, month, day)
Prestaul
2008-09-18 04:02:50