Days of the month

potts

Registered User.
Local time
Today, 18:35
Joined
Jul 24, 2002
Messages
87
I want to create an unbound text box control that has a default value of the last date of the current month.

Does anyone know the formatting for this?
 
Try

This will produce last day number (dd) of current month
=Left(CDate("01/" & (Mid(Date(),4,2)+1) & "/" & Year(Date()))-1,2)

This produces last day of current month (dd/mm/yyyy)
=Left(CDate("01/" & (Mid(Date(),4,2)+1) & "/" & Year(Date()))-1,2) & "/" & Mid(Date(),4)


Smed
 
Last edited:

Users who are viewing this thread

Back
Top Bottom