last day of previous month?

deejay_totoro

Registered User.
Local time
Today, 18:28
Joined
May 29, 2003
Messages
169
Hello all,

I have an unusal problem concerning dates.

I have a button on a form that when clicked, sets a label to the the current date.

However, what I would really like it to do is set the date the the last day of the previous month. For example, if I clicked it today, it would set 31/08/2004.

Any help much appreciated!

Many thanks!

dj_T
 
Microsoft article Q210604 discusses calculating dates in various ways.
The one you want would be:
- The last day of the previous month:
DateSerial(Year(Date()), Month(Date()),0)
 
Great!

Great!

Thanks that helped lots!

Cheers,

dj_T
 

Users who are viewing this thread

Back
Top Bottom