[AccessD] A2K: Getting incorrect date

Darren DICK d.dick at uws.edu.au
Mon Apr 26 23:36:04 CDT 2004


Hello all
Can anyone tell me why dtTimeElapsed  is returning a crap date around 1900 or so?
dtStartDate returns the expected date as does dtTodaysDate 
Many thanks

Darren

Dim dtStartDate As Date
Dim dtTodaysDate As Date
Dim dtTimeElapsed As Date

dtStartDate = DLookup("[EnrolmentDate]", "tblStudentAwardAllocations", "[AwardID] = " _
    & Forms!frmStudents!cmbAwards)
dtTodaysDate = Date
dtTimeElapsed = Format(DateDiff("y", [dtTodaysDate], [dtStartDate]), "m")

MsgBox "EnrolDate = " & dtStartDate & vbCrLf _
& "Today = " & dtTodaysDate & vbCrLf _
& "elapsed = " & dtTimeElapsed



More information about the AccessD mailing list