1. Dan
Senior Member
Join Date
Dec 1969
Posts
1,364

Is there a way to determine of a number has decimal places?<BR>ex:<BR><BR>4 = no<BR>5.1235 = yes<BR><BR>i&#039;m trying to figure out a way to determine of the current year is a leap year... so i figured if the year was cleanly divisible by 4, then it is... of there&#039;s decimals, then it isn&#039;t.

2. Senior Member
Join Date
Dec 1969
Posts
758

do this.. <BR><BR>If (number Mod 4 = 0) Then<BR> it is evenly divisibly by 4<BR>End If

3. Senior Member
Join Date
Dec 1969
Posts
1,431

That method is not quite correct for determining l

use this instead<BR><BR>Private Function isLeapYear(dtDate)<BR> Dim intYear<BR> <BR> intYear = Year(dtDate)<BR> <BR> If Year Mod 400 = 0 Then<BR> isLeapYear = True<BR> ElseIf Year Mod 100 = 0 Then<BR> intleapyear = False<BR> ElseIf Year Mod 4 = 0 Then<BR> intleapyear = True<BR> Else<BR> intleapyear = False<BR> End If<BR> <BR> End Function<BR>

4. Senior Member
Join Date
Dec 1969
Posts
758

right, but i was...

just showing the way to find if the number is evenly divisible by 4 or not.. that, to me, was what he was asking. <BR><BR>Jason<BR>http://www.jasontconnell.com

5. Senior Member
Join Date
Dec 1969
Posts
1,431

Sorry Jason

I meant to reply to the original post you were just an innocent bystander.

6. Senior Member
Join Date
Dec 1969
Posts
758

oh, no hard feelings ;-) eop

.

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•