[AccessD] A2K: Getting incorrect date

Stuart McLachlan stuart at lexacorp.com.pg
Tue Apr 27 05:29:58 CDT 2004


On 27 Apr 2004 at 14:36, Darren DICK wrote:

> 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
> 
> 
> Dim dtStartDate As Date
> Dim dtTodaysDate As Date
> Dim dtTimeElapsed As Date
> 

Because an elapsed period is not a date. It is a number.  DateDiff() returns *number* of time periods
Dim dtTimeElapsed as a long  to get the number of  the time periods specified by the first paramter of DateDiff.


 
-- 
Lexacorp Ltd
http://www.lexacorp.com.pg
Information Technology Consultancy, Software Development,System Support.






More information about the AccessD mailing list