Date Diff- weeks/days

  • Thread starter Thread starter Anne
  • Start date Start date
A

Anne

I would like to display the difference between a specified date
[DateofInjury] and today, but in weeks and days. The following gives me the
weeks, but I would like the days as well.

=DateDiff("ww",[DateofInjury],Date())

I am sure this is easy, but eludes this novice...
 
Anne said:
I would like to display the difference between a specified date
[DateofInjury] and today, but in weeks and days. The following gives me the
weeks, but I would like the days as well.

=DateDiff("ww",[DateofInjury],Date())


Try this kind of thing:

DateDiff("d", DateofInjury, Date()) \ 7 * " weeks and " &
DateDiff("d", DateofInjury, Date()) Mod 7 * " days"
 
Thanks Marsh!

To make it work all I changed was the * to an & before the string " weeks
and" and " days". That gave me exactly what I needed.

Perfect and so quick...

Marshall Barton said:
Anne said:
I would like to display the difference between a specified date
[DateofInjury] and today, but in weeks and days. The following gives me the
weeks, but I would like the days as well.

=DateDiff("ww",[DateofInjury],Date())


Try this kind of thing:

DateDiff("d", DateofInjury, Date()) \ 7 * " weeks and " &
DateDiff("d", DateofInjury, Date()) Mod 7 * " days"
 
Linq said:
Marsh's fingers apparently were greasy and kept slipping one key tp the right!

Thanks for the excuse, Linq, but my fingers were not greasy.
I washed them right after I used a stick of cheese to train
the new puppy ;-) OTOH, my few remaining brain cells are
not all that well connected to my fumbly fingers so I often
miss the intended key.
 
Back
Top