What is the syntax to return a date, given a year, month, day?

DateSerial (year, month, day)
‘all three parameters are mandatory
'year - range 100-9999
'month - range 1-12
'day - range 1-31
‘examples
MsgBox (DateSerial(2050, 4, 23)) ‘returns 4/23/2050
MsgBox (DateSerial(22, 9, 17)) ‘returns 9/17/2022

 

 

Advertisements