DecodeDate

Top  Previous  Next

sub DecodeDate(dDateValue As DateTime, ByRef Year As Integer, ByRef Month As Integer, ByRef Day As Integer)

 

Returns Year, Month, and Day values for a DateTime value.

 

Parameters

 

dDateValue ... DateTime expression.
Year ... Integer value. Year of the passed dDateValue parameter.
Month ... Integer value. Month of the passed dDateValue parameter.
Day ... Integer value. Day of the passed dDateValue parameter.

 

Example:

Dim iYear, iMonth, iDay
 
DecodeDate(Now, iYear, iMonth, iDay)
' returns eg. iYear = 2008, iMonth = 12, iDay = 11




Translate document: