Dear reader,
With DatePart() you can subtract the year or the week from a date field
with:
DatePart("yyyy";[DateField]) for the year
DatePart("ww";[DateField]) for the week
But how can I subtract the month or the combination of year & month from a
date field?
DatePart("mmm";[DateField]) dos not work
Tanks for any help.
Kind regards,
Simon van Beek
Rick Brandt - 16 Dec 2005 18:37 GMT
> Dear reader,
>
[quoted text clipped - 9 lines]
>
> DatePart("mmm";[DateField]) dos not work
Just use one "m".

Signature
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Randy Harris - 16 Dec 2005 18:43 GMT
> Dear reader,
>
[quoted text clipped - 15 lines]
>
> Simon van Beek
Simon, I think you mean extract rather than subtract. Try:
DatePart("m", [DateField])
or
Month([DateField])

Signature
Randy Harris
tech at promail dot com
I'm pretty sure I know everything that I can remember.
King Ron - 16 Dec 2005 20:20 GMT
<fake pirate voice>
Actual lad, ye needs to use the DateAdd() funk-she-own.
DateAdd("m", -6, MyDate)
will return the date 6 months previous.
Arrrgh. matey
</fake pirate voice>
King Ron of Chi