[mso] Re: Custom Date difference

  • From: Wilson Baptista Junior <wilson@xxxxxxxxxx>
  • To: mso@xxxxxxxxxxxxx
  • Date: Wed, 21 Jul 2004 09:29:46 -0300

Hi Ray,
you formula will work for Robert assuming that when he doesn't know the day 
or the month he wants the earliest possible date (that would amount to 
favoring the greatest possible age for the subject inside an one-year 
margin of tolerance), but when it comes to the year IMHO he shouldn't make 
such an assumption, he should trap the error and verify, because he would 
be introducing a very large error margin which would probably negate his 
use for the age datum.
Wilson

At 02:11 21/7/2004, Ray Blake wrote:
>DATEVALUE will convert a string to a conventional date. You could do a
>find and replace operation on your query marks, but that would then
>obscure the uncertainty, which you may wish to highlight.
>
>So, you might come up with a big formula to do it all for you, like
>this:
>
>=DATEDIF(DATEVALUE(IF(RIGHT(A1,1)="?",1,RIGHT(A1,2)) & "/" &
>IF(MID(A1,6,1)="?","January",MID(A1,6,2)) & "/" &
>IF(LEFT(A1,1)="?",1950,LEFT(A1,4))),TODAY(),"y")
>
>Ray
>
>
>-----Original Message-----
>From: mso-bounce@xxxxxxxxxxxxx [mailto:mso-bounce@xxxxxxxxxxxxx] On
>Behalf Of Robert Carneal
>Sent: 20 July 2004 21:55
>To: mso@xxxxxxxxxxxxx
>Subject: [mso] Re: Custom Date difference
>
>
>---COPY---
>I assume Robert is using Excel, since most of his recent questions have
>been about Excel.
>---End---
>
>You are correct, I am using Excel. It took me all of 30 seconds to fall
>in love with DATEDIF. I wish I had known about this earlier. Thank you!
>
>A query for you please. Suppose E1 is text, and contains 1922-10-10 as a
>person's birthdate. The death date is also text. Is there an easy way to
>convert that to a "real" date? LOL, I spent NINE hours trying to get
>Datedif to work, only to discover the numbers were not even date format!
>
>I do see a problem with the dates which explains why the original person
>made it text. The original person used the question mark symbol to
>denote unknown. 1905-??-17 for example, means the month is unknown.
>
>Am I going to need to do something about the question marks one at a
>time?
>
>Thank you.
>
>Robert


*************************************************************
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, send an email to 
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes) in 
the subject line.

Or, visit the group's homepage and use the dropdown menu.  This will also allow 
you to change your email settings to digest or vacation (no mail).
//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
*************************************************************

Other related posts: