[AccessD] Birthday in table

Lembit Soobik lembit.dbamail at t-online.de
Fri Jun 15 13:09:35 CDT 2007


guess you overlooked the first ELSE  :)
if it is divisible by 400 then ... -> finish

Lembit

----- Original Message ----- 
From: "Arthur Fuller" <fuller.artful at gmail.com>
To: "Access Developers discussion and problem solving" 
<accessd at databaseadvisors.com>
Sent: Friday, June 15, 2007 7:50 PM
Subject: Re: [AccessD] Birthday in table


> Can you cite one instance when a year was evenly divisible by 400 but not 
> by
> 100? I gotta hear this!
>
> On 6/15/07, Bryan Carbonnell <carbonnb at gmail.com> wrote:
>>
>> On 6/15/07, Arthur Fuller <fuller.artful at gmail.com> wrote:
>> > The definition of a leap year is a two-step:
>> >
>> > 1. if the year is evenly divisible by four then you're cool, except:
>> > 2. if the year ends in 00 then it must be evenly divisible by 400 --
>> thus
>> > 1900 was not a leap year but 2000 was.
>> >
>> > That should be enough data.
>>
>> Determining Leap years are actually a 3 step process
>>
>> Is the year evenly divisible by 4? If so, it is a leap year,
>> unless...
>> Is the year evenly divisible by 100? (for example, 1500?) If so, it is
>> not a leap year,
>> unless...
>> Is the year evenly divisible by 400? If so, it is a leap year.
>>
>> Here is a function I cribbed from wikipedia to determine if a year is
>> a leap year.
>>
>> Function ISLEAPYEAR(Year As Integer)
>> ' This is a function which returns a simple TRUE
>> ' or FALSE depending on whether it fits.
>>
>> Dim varAns As Boolean
>> If Year Mod 400 = 0 Then
>>    varAns = True
>> Else
>>    If Year Mod 100 = 0 Then
>>        varAns = False
>>    Else
>>        If Year Mod 4 = 0 Then
>>            varAns = True
>>        Else
>>            varAns = False
>>        End If
>>    End If
>> End If
>>
>> ISLEAPYEAR = varAns
>> End Function
>>
>> --
>> Bryan Carbonnell - carbonnb at gmail.com
>> Life's journey is not to arrive at the grave safely in a well
>> preserved body, but rather to skid in sideways, totally worn out,
>> shouting "What a great ride!"
>> --
>> AccessD mailing list
>> AccessD at databaseadvisors.com
>> http://databaseadvisors.com/mailman/listinfo/accessd
>> Website: http://www.databaseadvisors.com
>>
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.472 / Virus Database: 269.8.16/849 - Release Date: 14.06.2007 
> 12:44
>
> 




More information about the AccessD mailing list