[mso] Re: Access 2000 date routines ? Pre-written somewhere? :VSMail mx1
- From: "James LaBorde" <jlaborde@xxxxxxxxx>
- To: <mso@xxxxxxxxxxxxx>
- Date: Fri, 23 Jun 2006 12:23:40 -0700
Robert,
It is possible that the 29th is causing a problem, but it shouldn't if =
that is a valid date. If it lets you enter it in a date field it should =
accept it as a valid date.
James
-----Original Message-----
From: mso-bounce@xxxxxxxxxxxxx [mailto:mso-bounce@xxxxxxxxxxxxx]On
Behalf Of Robert Carneal
Sent: Friday, June 23, 2006 12:16 PM
To: mso@xxxxxxxxxxxxx
Subject: [mso] Re: Access 2000 date routines ? Pre-written somewhere?
:VSMail mx1
It did what I wanted except for February 29, 1872 (yes, it is a valid =
date)
for a birth, and a death date of: November 2, 1954. I had wanted an age =
of
0820804 (YYYMMDD format; 82 yrs, 8 mths, & 4 days old), but instead it =
gives
me "########" for a result. Could Feb 29 be throwing this off?
Could I have done something wrong? I pretty much copied your routine. =
This
is the only date I am aware of that gives me such an answer, but that is =
not
to say I have tried every possible date- just the dates I have.
Thank you sir.
Robert
-----Original Message-----
From: mso-bounce@xxxxxxxxxxxxx [mailto:mso-bounce@xxxxxxxxxxxxx]On =
Behalf Of
James LaBorde
Sent: 2006-06-23 14:02
To: mso@xxxxxxxxxxxxx
Subject: [mso] Re: Access 2000 date routines ? Pre-written somewhere?
:VSMail mx5
Robert,
Did this do what you were looking for or is it still an issue?
James
-----Original Message-----
From: mso-bounce@xxxxxxxxxxxxx [mailto:mso-bounce@xxxxxxxxxxxxx]On
Behalf Of James LaBorde
Sent: Monday, June 19, 2006 8:47 AM
To: mso@xxxxxxxxxxxxx
Subject: [mso] Re: Access 2000 date routines ? Pre-written somewhere?
:VSMail mx5
Robert,
I don't recall seeing it, but it should be possible with code. If you =
=3D
=3D3D
want to give it a shot I would be happy to help (and I won't even charge =
=3D
=3D3D
you $25/yr for the code).
Plug this into a module, compile and save it:
**********Snip Here*****************
Function GeneologyAge(DtBegin As Date, DtEnd As Date) As String
Dim strYears As String
Dim IntYears As Integer
Dim strMonths As String
Dim IntMonths As Integer
Dim strDays As String
Dim IntDays As Integer
IntYears =3D3D3D DateDiff("yyyy", DtBegin, DtEnd)
strYears =3D3D3D CStr(IntYears)
Do
If Len(strYears) < 3 Then
strYears =3D3D3D "0" + strYears
End If
Loop Until Len(strYears) =3D3D3D 3
DtBegin =3D3D3D DateAdd("yyyy", IntYears, DtBegin)
IntMonths =3D3D3D DateDiff("m", DtBegin, DtEnd)
strMonths =3D3D3D CStr(IntMonths)
If Len(strMonths) < 2 Then
strMonths =3D3D3D "0" + strMonths
End If
DtBegin =3D3D3D DateAdd("m", IntMonths, DtBegin)
IntDays =3D3D3D DateDiff("d", DtBegin, DtEnd)
strDays =3D3D3D CStr(IntDays)
If Len(strDays) < 2 Then
strDays =3D3D3D "0" + strDays
End If
GeneologyAge =3D3D3D strYears + strMonths + strDays
End Function
************Snip Here********************
After you do that all you have to do is Call the GeneologyAge function =
=3D
=3D3D
in your query and plug in your begining and ending dates. This should =
=3D
=3D3D
return the data in the format you are looking for.
If you need any more assistance with it please feel free to ask.
Thank You,
James La Borde
-----Original Message-----
From: mso-bounce@xxxxxxxxxxxxx [mailto:mso-bounce@xxxxxxxxxxxxx]On
Behalf Of Robert Carneal
Sent: Friday, June 16, 2006 4:50 PM
To: mso@xxxxxxxxxxxxx
Subject: [mso] Access 2000 date routines ? Pre-written somewhere?
:VSMail mx1
It seems as though I saw a site with some "genealogy-related date =3D3D
routines
for Access 2000" somewhere. Where you were allowed to view the code (in =
=3D
=3D3D
some
cases, copy it if you wanted); and I think there was a small fee =3D3D
involved.
($25.00/yr ??) If anyone knows what I am talking about, please let me =
=3D
=3D3D
know.
I searched through my Archives and MSO Archives to no avail.
What I very much would like to do in Access is have two dates (one or =
=3D
=3D3D
both
may be before 1900-01-01) and properly calculate the date to give a
seven-digit representation of age.
Example:
Date 1: 1855-01-15
Date 2: 1935-04-09
Age in years, months, days is 80yrs, 2mths, 25 days. Or, in YYYMMDD =
=3D3D
format,
0800225. A YYYMMDD format allows for a max age of 9991230, 999yrs, 12 =
=3D
=3D3D
mths,
& 30 days. Does anyone recall this please?
Thank you.
Robert
*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx =
=3D
=3D3D
or MicrosoftOffice@xxxxxxxxxxxxxxxx
To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
To Unsubscribe from this group, visit the group's homepage and use the =
=3D
=3D3D
dropdown menu at the top. This will allow you to unsubscribe your email =
=3D
=3D3D
address or change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso
To be able to use the files section for sharing files with the group, =
=3D
=3D3D
send a request to mso-moderators@xxxxxxxxxxxxx and you will be sent an =
=3D
=3D3D
invitation with instructions. Once you are a member of the files group, =
=3D
=3D3D
you can go here to upload/download files:
http://www.smartgroups.com/vault/msofiles
If you are using Outlook and you see a lot of unnecessary code in your =
=3D
=3D3D
email messages, read these instructions that explain why and how to fix =
=3D
=3D3D
it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************
*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx =
=3D
or MicrosoftOffice@xxxxxxxxxxxxxxxx
To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
To Unsubscribe from this group, visit the group's homepage and use the =
=3D
dropdown menu at the top. This will allow you to unsubscribe your email =
=3D
address or change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso
To be able to use the files section for sharing files with the group, =
=3D
send a request to mso-moderators@xxxxxxxxxxxxx and you will be sent an =
=3D
invitation with instructions. Once you are a member of the files group, =
=3D
you can go here to upload/download files:
http://www.smartgroups.com/vault/msofiles
If you are using Outlook and you see a lot of unnecessary code in your =
=3D
email messages, read these instructions that explain why and how to fix =
=3D
it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************
*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx =
or
MicrosoftOffice@xxxxxxxxxxxxxxxx
To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
To Unsubscribe from this group, visit the group's homepage and use the
dropdown menu at the top. This will allow you to unsubscribe your email
address or change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso
To be able to use the files section for sharing files with the group, =
send a
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an =
invitation
with instructions. Once you are a member of the files group, you can go
here to upload/download files:
http://www.smartgroups.com/vault/msofiles
If you are using Outlook and you see a lot of unnecessary code in your =
email
messages, read these instructions that explain why and how to fix it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************
*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx =
or MicrosoftOffice@xxxxxxxxxxxxxxxx
To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
To Unsubscribe from this group, visit the group's homepage and use the =
dropdown menu at the top. This will allow you to unsubscribe your email =
address or change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso
To be able to use the files section for sharing files with the group, =
send a request to mso-moderators@xxxxxxxxxxxxx and you will be sent an =
invitation with instructions. Once you are a member of the files group, =
you can go here to upload/download files:
http://www.smartgroups.com/vault/msofiles
If you are using Outlook and you see a lot of unnecessary code in your =
email messages, read these instructions that explain why and how to fix =
it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************
*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or
MicrosoftOffice@xxxxxxxxxxxxxxxx
To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
To Unsubscribe from this group, visit the group's homepage and use the dropdown
menu at the top. This will allow you to unsubscribe your email address or
change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso
To be able to use the files section for sharing files with the group, send a
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with
instructions. Once you are a member of the files group, you can go here to
upload/download files:
http://www.smartgroups.com/vault/msofiles
If you are using Outlook and you see a lot of unnecessary code in your email
messages, read these instructions that explain why and how to fix it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************
- References:
- [mso] Re: Access 2000 date routines ? Pre-written somewhere? :VSMail mx5
- From: Robert Carneal
Other related posts:
- » [mso] Re: Access 2000 date routines ? Pre-written somewhere? :VSMail mx1
- » [mso] Re: Access 2000 date routines ? Pre-written somewhere? :VSMail mx1
- » [mso] Re: Access 2000 date routines ? Pre-written somewhere? :VSMail mx1
- [mso] Re: Access 2000 date routines ? Pre-written somewhere? :VSMail mx5
- From: Robert Carneal