
HELP - Need help on DATE data type
Very Close just add CDate() to your function and remove Quotes from around
the variables you are passing.
ThisDate = CDate( monthGottenElsewhere & "/" & dayGottenElsewhere _
& "/" & yearGottenElsewhere)
This works for string months (i.e., "Jan", "January", "1", "01", etc.),
integer Months (i.e., 1, 2, 3)
And string/integer years. I think this is because VB forces them to
StringVariants.
--
Steven Allyn Taylor
Quote:
> What data types are the individual pieces of a
> date data type ??
> If I assign 02/12/99 as a date data type
> then is the "02" an Integer, a String, or a Long ?
> I ask this because in my code, I'm trying to "assemble"
> a date from pieces which are gotten elsewhere in the program.
> I want to do this:
> Dim ThisDate as Date
> ThisDate = "monthGottenElsewhere" & "/" & "dayGottenElsewhere" _
> & "/" & "yearGottenElsewhere"
> but I don't know the datatypes of the individual pieces.
> ... Or can you even do this ???