[RESOLVED] [2005] Date Variables
To set a date to a date variable, you use:
date variable = #some date#
Can you do this with variables as the days, months and years? something like this?:
date variable = #month variable/day variable/year variable#
It doesn't let me do that. It underlines the first hash sign and says: 'expression expected'. what does it mean and how (if its possible) do you set a date with variables as the days, months and years?
Re: [2005] Date Variables
No you can't. The '#' symbols are used for date literals only. If you want to build a Date using variables you have to use a Date constructor, e.g.
VB Code:
Dim myDate As Date = New Date(years, months, days)