[AccessD] Break a float into it's parts

Gustav Brock Gustav at cactus.dk
Fri Feb 2 08:57:17 CST 2007


Hi John

Use Int() as here:

    ' Retrieve date (integer) part.
    dblDate = Int(datTime)
    ' Retrieve time (decimal) part.
    dblTime = datTime - dblDate
    ' Assemble date and time part.
    datTime = CVDate(dblDate + dblTime)

/gustav

>>> jwcolby at colbyconsulting.com 02-02-2007 15:37:05 >>>
How do I get the integer part and the decimal part of a floating point
number
 
23.456
 
how do I get the 23
how do I get the .456
 
Using clng for example "rounds" the number up or down which isn't what I
want for the integer portion
 
John W. Colby
Colby Consulting
www.ColbyConsulting.com 





More information about the AccessD mailing list