On Mon, 25 Oct 2010 03:55:59 -0700 (PDT), jean <(E-Mail Removed)> wrote:
>Hi
>
>I have a field formatted dd/mm/yy like 25/11/74 representing 25 of
>november 1974
If this is a Date/Time field, the format is irrelevant - a Date is actually
stored as a number, a count of days (and fractions of a day, times) since
midnight, December 30, 1899. The format merely controls how that number is
displayed.
>I want to calculate the number of days between that day and today
>
>Exemple if today is the 20/11/10 answer would be 5
>if today is the 28/11/10 answer would be -3
DateDiff("d", [fieldname], Date())
will calculate the integer number of days (that's the "d", you can use other
units, see the VBA help for Datediff) between the arguments.
If your field is a Text field you'll need to convert it to a date/time value
in the calculation.
--
John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/For...-US/accessdev/
http://social.answers.microsoft.com/.../en-US/addbuz/
and see also
http://www.utteraccess.com