If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Birthdays/Anniversaries
Is there any way to calculate the age of my clients and show the results in
the Calendar? For example: Thomas's 24 birthday -- jkw |
#2
|
|||
|
|||
You can create a custom field which calculates a value using "datediff"
function. First, enter design mode on the form. On tab p.2, rename to "Age". Add two new fields, "Age" and "Birthday". The Age field is a number, the birthday field is a date. On the Age field, go to the Value tab on the Properties. Under Initial Value, check "set initial value of this field to:" and add the following code: Datediff("yyyy",[Birthday],Now) Run the form. When you add the contact's birthday to the Birthday field, his age appears in the age field. Publish the form, and you are all set. "wiersma7" wrote: Is there any way to calculate the age of my clients and show the results in the Calendar? For example: Thomas's 24 birthday -- jkw |
#3
|
|||
|
|||
Gentle with us amateur and non programmers, Josh!
I've managed the form design and even publishing to the organization forms library, but I have two issues; How can I apply this form to existing contacts? The "age" calculated by the formula is the age at this years 'birthday", not necessarily the current age. i.e., if the contacts 30th birthday will be in October, the formula currently displays age 30 today. Can the formula be changed to consider months and days,not just years? -- /kj "Josh" wrote in message ... You can create a custom field which calculates a value using "datediff" function. First, enter design mode on the form. On tab p.2, rename to "Age". Add two new fields, "Age" and "Birthday". The Age field is a number, the birthday field is a date. On the Age field, go to the Value tab on the Properties. Under Initial Value, check "set initial value of this field to:" and add the following code: Datediff("yyyy",[Birthday],Now) Run the form. When you add the contact's birthday to the Birthday field, his age appears in the age field. Publish the form, and you are all set. "wiersma7" wrote: Is there any way to calculate the age of my clients and show the results in the Calendar? For example: Thomas's 24 birthday -- jkw |
#4
|
|||
|
|||
Research the datediff function on MSDN. You will have to build a more
complicated expression for the field value to accomplish this. Datediff can use year, month, day, or other interval to calculate the time intervals. Then use another function to format the date. You might want to consider writing a script instead. A script could automatically create the calendar item which the original poster seemed to want. To publish to existing contacts, there is a way, but I can't remember. There is a word document that contains a script that someone made. It is either on slipstick.com or MSDN. It gets complicated using form definitions and such. "kj" wrote in message ... Gentle with us amateur and non programmers, Josh! I've managed the form design and even publishing to the organization forms library, but I have two issues; How can I apply this form to existing contacts? The "age" calculated by the formula is the age at this years 'birthday", not necessarily the current age. i.e., if the contacts 30th birthday will be in October, the formula currently displays age 30 today. Can the formula be changed to consider months and days,not just years? -- /kj "Josh" wrote in message ... You can create a custom field which calculates a value using "datediff" function. First, enter design mode on the form. On tab p.2, rename to "Age". Add two new fields, "Age" and "Birthday". The Age field is a number, the birthday field is a date. On the Age field, go to the Value tab on the Properties. Under Initial Value, check "set initial value of this field to:" and add the following code: Datediff("yyyy",[Birthday],Now) Run the form. When you add the contact's birthday to the Birthday field, his age appears in the age field. Publish the form, and you are all set. "wiersma7" wrote: Is there any way to calculate the age of my clients and show the results in the Calendar? For example: Thomas's 24 birthday -- jkw |
#5
|
|||
|
|||
Not as simple as adding mm,dd to yyyy part of;
Datediff("yyyy",[Birthday],Now) eh? It figures. But you've spurred my interest, so I will go poke around MSDN despite it all too frequently giving me a headache. ;-) Thanks. -- /kj "Joshua Heard" wrote in message ... Research the datediff function on MSDN. You will have to build a more complicated expression for the field value to accomplish this. Datediff can use year, month, day, or other interval to calculate the time intervals. Then use another function to format the date. You might want to consider writing a script instead. A script could automatically create the calendar item which the original poster seemed to want. To publish to existing contacts, there is a way, but I can't remember. There is a word document that contains a script that someone made. It is either on slipstick.com or MSDN. It gets complicated using form definitions and such. "kj" wrote in message ... Gentle with us amateur and non programmers, Josh! I've managed the form design and even publishing to the organization forms library, but I have two issues; How can I apply this form to existing contacts? The "age" calculated by the formula is the age at this years 'birthday", not necessarily the current age. i.e., if the contacts 30th birthday will be in October, the formula currently displays age 30 today. Can the formula be changed to consider months and days,not just years? -- /kj "Josh" wrote in message ... You can create a custom field which calculates a value using "datediff" function. First, enter design mode on the form. On tab p.2, rename to "Age". Add two new fields, "Age" and "Birthday". The Age field is a number, the birthday field is a date. On the Age field, go to the Value tab on the Properties. Under Initial Value, check "set initial value of this field to:" and add the following code: Datediff("yyyy",[Birthday],Now) Run the form. When you add the contact's birthday to the Birthday field, his age appears in the age field. Publish the form, and you are all set. "wiersma7" wrote: Is there any way to calculate the age of my clients and show the results in the Calendar? For example: Thomas's 24 birthday -- jkw |
#6
|
|||
|
|||
DateDiff has rounding issues. See =
http://www.slipstick.com/contacts/calcage.htm for a formula that works = in almost every case.=20 --=20 Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for=20 Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "kj" wrote in message = ... Not as simple as adding mm,dd to yyyy part of; Datediff("yyyy",[Birthday],Now) eh? =20 It figures. But you've spurred my interest, so I will go poke around = MSDN=20 despite it all too frequently giving me a headache. ;-) =20 Thanks. =20 --=20 /kj "Joshua Heard" wrote in message=20 ... Research the datediff function on MSDN. You will have to build a = more=20 complicated expression for the field value to accomplish this. = Datediff=20 can use year, month, day, or other interval to calculate the time=20 intervals. Then use another function to format the date. You might = want=20 to consider writing a script instead. A script could automatically = create=20 the calendar item which the original poster seemed to want. To publish to existing contacts, there is a way, but I can't = remember.=20 There is a word document that contains a script that someone made. = It is=20 either on slipstick.com or MSDN. It gets complicated using form=20 definitions and such. "kj" wrote in message=20 ... Gentle with us amateur and non programmers, Josh! I've managed the form design and even publishing to the organization = forms library, but I have two issues; How can I apply this form to existing contacts? The "age" calculated by the formula is the age at this years = 'birthday",=20 not necessarily the current age. i.e., if the contacts 30th birthday will be in October, the formula=20 currently displays age 30 today. Can the formula be changed to = consider=20 months and days,not just years? --=20 /kj "Josh" wrote in message=20 ... You can create a custom field which calculates a value using = "datediff" function. First, enter design mode on the form. On tab p.2, rename to "Age". = Add=20 two new fields, "Age" and "Birthday". The Age field is a number, the=20 birthday field is a date. On the Age field, go to the Value tab on the=20 Properties. Under Initial Value, check "set initial value of this field to:" = and add=20 the following code: Datediff("yyyy",[Birthday],Now) Run the form. When you add the contact's birthday to the Birthday=20 field, his age appears in the age field. Publish the form, and you are = all=20 set. "wiersma7" wrote: Is there any way to calculate the age of my clients and show the=20 results in the Calendar? For example: Thomas's 24 birthday --=20 jkw =20 =20 |
#7
|
|||
|
|||
Thanks Sue. That formula works great except for the leap year babies as
noted. Perhaps you can enlighten me on this. I was expecting this formula and forms change to save the "age" value to the contact, but it seems to only calculate the "age" when I create the contact or "run" the form. When I save and exit the age value is not retained. Did I do something wrong or are my expectations amiss? -- /kj "Sue Mosher [MVP-Outlook]" wrote in message ... DateDiff has rounding issues. See http://www.slipstick.com/contacts/calcage.htm for a formula that works in almost every case. -- 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 "kj" wrote in message ... Not as simple as adding mm,dd to yyyy part of; Datediff("yyyy",[Birthday],Now) eh? It figures. But you've spurred my interest, so I will go poke around MSDN despite it all too frequently giving me a headache. ;-) Thanks. -- /kj "Joshua Heard" wrote in message ... Research the datediff function on MSDN. You will have to build a more complicated expression for the field value to accomplish this. Datediff can use year, month, day, or other interval to calculate the time intervals. Then use another function to format the date. You might want to consider writing a script instead. A script could automatically create the calendar item which the original poster seemed to want. To publish to existing contacts, there is a way, but I can't remember. There is a word document that contains a script that someone made. It is either on slipstick.com or MSDN. It gets complicated using form definitions and such. "kj" wrote in message ... Gentle with us amateur and non programmers, Josh! I've managed the form design and even publishing to the organization forms library, but I have two issues; How can I apply this form to existing contacts? The "age" calculated by the formula is the age at this years 'birthday", not necessarily the current age. i.e., if the contacts 30th birthday will be in October, the formula currently displays age 30 today. Can the formula be changed to consider months and days,not just years? -- /kj "Josh" wrote in message ... You can create a custom field which calculates a value using "datediff" function. First, enter design mode on the form. On tab p.2, rename to "Age". Add two new fields, "Age" and "Birthday". The Age field is a number, the birthday field is a date. On the Age field, go to the Value tab on the Properties. Under Initial Value, check "set initial value of this field to:" and add the following code: Datediff("yyyy",[Birthday],Now) Run the form. When you add the contact's birthday to the Birthday field, his age appears in the age field. Publish the form, and you are all set. "wiersma7" wrote: Is there any way to calculate the age of my clients and show the results in the Calendar? For example: Thomas's 24 birthday -- jkw |
#8
|
|||
|
|||
You didn't say exactly how you implemented it. If you created a formula =
field, it should display a value both in the All Fields page and in the = folder view.=20 --=20 Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for=20 Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "kj" wrote in message = ... Thanks Sue. That formula works great except for the leap year babies = as=20 noted. =20 Perhaps you can enlighten me on this. I was expecting this formula and = forms=20 change to save the "age" value to the contact, but it seems to only=20 calculate the "age" when I create the contact or "run" the form. When = I save=20 and exit the age value is not retained. =20 Did I do something wrong or are my expectations amiss? =20 --=20 /kj "Sue Mosher [MVP-Outlook]" wrote in message=20 ... DateDiff has rounding issues. See=20 http://www.slipstick.com/contacts/calcage.htm for a formula that works = in=20 almost every case. "wiersma7" wrote: Is there any way to calculate the age of my clients and show the results in the Calendar? For example: Thomas's 24 birthday |
#9
|
|||
|
|||
I tried to follow the guidance from Josh's earlier post.
When I create a new contact and enter the bday, the age field is calculated and displays the correct value. But when I save the contact and later reopen it the "age" field while still 'defined' has no value. The Bday field remains populated. So, it seems the age field is being calculated but not saved. Does that make sense? (The age field does show in the custom form and "all fields" but has no value in either after saving) /kj ======= You can create a custom field which calculates a value using "datediff" function. First, enter design mode on the form. On tab p.2, rename to "Age". Add two new fields, "Age" and "Birthday". The Age field is a number, the birthday field is a date. On the Age field, go to the Value tab on the Properties. Under Initial Value, check "set initial value of this field to:" and add the following code: Datediff("yyyy",[Birthday],Now) Run the form. When you add the contact's birthday to the Birthday field, his age appears in the age field. Publish the form, and you are all set. ====== -- /kj "Sue Mosher [MVP-Outlook]" wrote in message ... You didn't say exactly how you implemented it. If you created a formula field, it should display a value both in the All Fields page and in the folder view. -- 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 "kj" wrote in message ... Thanks Sue. That formula works great except for the leap year babies as noted. Perhaps you can enlighten me on this. I was expecting this formula and forms change to save the "age" value to the contact, but it seems to only calculate the "age" when I create the contact or "run" the form. When I save and exit the age value is not retained. Did I do something wrong or are my expectations amiss? -- /kj "Sue Mosher [MVP-Outlook]" wrote in message ... DateDiff has rounding issues. See http://www.slipstick.com/contacts/calcage.htm for a formula that works in almost every case. "wiersma7" wrote: Is there any way to calculate the age of my clients and show the results in the Calendar? For example: Thomas's 24 birthday |
#10
|
|||
|
|||
I don't have Josh's earlier post handy, so I don't know how you're =
implementing the age field.=20 --=20 Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for=20 Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "kj" wrote in message = ... I tried to follow the guidance from Josh's earlier post. =20 When I create a new contact and enter the bday, the age field is = calculated=20 and displays the correct value. But when I save the contact and later = reopen=20 it the "age" field while still 'defined' has no value. The Bday field=20 remains populated. So, it seems the age field is being calculated but = not=20 saved. Does that make sense? =20 (The age field does show in the custom form and "all fields" but has = no=20 value in either after saving) /kj =3D=3D=3D=3D=3D=3D=3D You can create a custom field which calculates a value using = "datediff" function. =20 First, enter design mode on the form. On tab p.2, rename to "Age". = Add two new fields, "Age" and "Birthday". The Age field is a number, the = birthday field is a date. On the Age field, go to the Value tab on the = Properties. Under Initial Value, check "set initial value of this field to:" and = add the following code: =20 Datediff("yyyy",[Birthday],Now) =20 Run the form. When you add the contact's birthday to the Birthday = field, his age appears in the age field. Publish the form, and you are all = set. =3D=3D=3D=3D=3D=3D =20 =20 =20 --=20 /kj "Sue Mosher [MVP-Outlook]" wrote in message=20 ... You didn't say exactly how you implemented it. If you created a = formula=20 field, it should display a value both in the All Fields page and in = the=20 folder view. =20 "kj" wrote in message=20 ... Thanks Sue. That formula works great except for the leap year babies = as noted. Perhaps you can enlighten me on this. I was expecting this formula = and=20 forms change to save the "age" value to the contact, but it seems to only calculate the "age" when I create the contact or "run" the form. When = I=20 save and exit the age value is not retained. Did I do something wrong or are my expectations amiss? --=20 /kj "Sue Mosher [MVP-Outlook]" wrote in message ... DateDiff has rounding issues. See http://www.slipstick.com/contacts/calcage.htm for a formula that = works in almost every case. "wiersma7" wrote: Is there any way to calculate the age of my clients and show the results in the Calendar? For example: Thomas's 24 birthday =20 |
|
Thread Tools | |
Display Modes | |
|
|