Group:  Microsoft Outlook ยป microsoft.public.outlook.program_forms
Thread: Simple help with a line of code, please?

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Simple help with a line of code, please?
Angyl 07.07.2006 22:15:02
I'm using this for a custom field in outlook:

DateDiff("m", [ContractDate] , Date())

to show how long a client has been with us in months. I'd like to change
that to years but I can't get it.

I've tried changing the "m" to "y" with no success

and tried adding /12 to the end of the formula with no success either.

Help?
Re: Simple help with a line of code, please?
"Sue Mosher [MVP-Outlook]" <suemvp[ at ]outlookcode.com> 07.07.2006 22:49:34
"yyyy" not "y". See http://msdn.microsoft.com/library/en-us/vbenlr98/html/vafctDateDiff.asp

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Angyl" <Angyl[ at ]discussions.microsoft.com> wrote in message news:4945882D-96AD-4EEE-B4F9-854E31C436E2[ at ]microsoft.com...
[Quoted Text]
> I'm using this for a custom field in outlook:
>
> DateDiff("m", [ContractDate] , Date())
>
> to show how long a client has been with us in months. I'd like to change
> that to years but I can't get it.
>
> I've tried changing the "m" to "y" with no success
>
> and tried adding /12 to the end of the formula with no success either.
>
> Help?

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net