Date Manipulation of Components

Is it possible to manipulate the components, such as year, month, daya datein VBA? I need a function that, given the day, month, and year, returns the corresponding date.

+3
source share
3 answers
DateSerial(YEAR, MONTH, DAY)

will be what you are looking for.

DateSerial(2008, 8, 19) returns 8/19/2008

+6
source

There are several date functions in VBA - check this site

DateSerial (YEAR, MONTH, DAY)

+2
source

Do you want DateSerial :

Dim someDate As Date = DateSerial(year, month, day)
+2
source

Source: https://habr.com/ru/post/1697097/


All Articles