date

S

Schuco

How to find last date in the month? If I put number 1 in one text box I
would like to see 31.01.2003 in another text box and so on.

Does anyone know how to do that?

Regards,
Schuco
 
S

StCyrM

Hi Schuco

The function that follows should do it for you.

Best regards

Maurice

--------------------------------------
Public Function fDatEomDat(dDate As Date) As Date
' Function returns last day of month (EOM) from passed date
' ie. #02/05/2001# returns #02/28/2001#
fDatEomDat = DateSerial(Year(dDate), Month(dDate) + 1, 1) - 1
End Function
 
S

Schuco

Thank you very much!

/Schuco


StCyrM said:
Hi Schuco

The function that follows should do it for you.

Best regards

Maurice

--------------------------------------
Public Function fDatEomDat(dDate As Date) As Date
' Function returns last day of month (EOM) from passed date
' ie. #02/05/2001# returns #02/28/2001#
fDatEomDat = DateSerial(Year(dDate), Month(dDate) + 1, 1) - 1
End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top