Pegasus [MVP] wrote:
Quote:
> "HAL07" <yahoohal@xxxxxx> wrote in message
> news:OOjg8bI%23JHA.4692@xxxxxx Quote:
>> Hi there, do anybody by chance have such a function laying around?
>>
>> I would like to e.g. output wscript.echo "You are " &
>> dateduration(now(), "1980.01.04", "13:42" ) & " old."
>>
>> Will output:
>> You are 29 years, x months, x weeks, x hours and x seconds old
>>
>>
>>
>> --
>> -- HAL07, Engineering Services, Norway
>> -- Info: social.technet.microsoft.com/Forums/ replaces a lot of the
>> newsgroups
>
> Use the DateDiff function to determine the difference (in seconds) between
> the two dates, then convert the seconds back into years, months, days etc.
> Note that your desired output ("You are 29 years, x months") is ambiguous:
> Are your months 28, 29, 30 or 31 days long?
>
> If unsure how to use the DateDiff function then I recommend that you
> download the help file script56.chm from the Microsoft site.
>
> thanks for helping me write one, however I asked if anybody had such a function ready.
--
-- HAL07, Engineering Services, Norway