Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.basic.misc > #276

Re: Difference of dates in years

From Todd Vargo <tlvargo@sbcglobal.netz>
Newsgroups comp.lang.basic.misc
Subject Re: Difference of dates in years
Date 2012-05-18 18:38 -0400
Organization albasani.net
Message-ID <jp6j0b$vql$1@news.albasani.net> (permalink)
References <op.weifpkbrsjedh2@w7-pc> <5ptcr79fc5ougdtc61t8982m3tifthn5t8@4ax.com>

Show all headers | View raw


On 5/18/2012 12:30 PM, ralph wrote:
> On Fri, 18 May 2012 17:23:34 +0200, "Helge Haensel"
> <dj1wm@nurfuerspam.de>  wrote:
>
>> Hallo NG!
>> I am still using VB5E under W7/64. It works within limits.
>> I calculate a difference in years by:
>>
>> Dim j as Long, Dim OtherDate as String
>> j = CLng(Date - (CDate(OtherDate))) / 365
>>
>> This works so far but surely isn't correct in all cases due to Feb 29.
>> Do you know a correct calculation?
>> Thanks!
>>
>
> Is DateDiff() not available in VB5E?
>
> -ralph

Yes it is.

-- 
Todd Vargo
(Post questions to group only. Remove "z" to email personal messages)

Back to comp.lang.basic.misc | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Difference of dates in years "Helge Haensel" <dj1wm@nurfuerspam.de> - 2012-05-18 17:23 +0200
  Re: Difference of dates in years ralph <nt_consulting64@yahoo.com> - 2012-05-18 11:30 -0500
    Re: Difference of dates in years Todd Vargo <tlvargo@sbcglobal.netz> - 2012-05-18 18:38 -0400
    Re: Difference of dates in years "Helge Haensel" <dj1wm@nurfuerspam.de> - 2012-05-19 10:17 +0200

csiph-web