month's last date

Results 1 to 2 of 2

Thread: month's last date

  1. #1
    Join Date
    Dec 1969

    Default month's last date

    ok i have a month number say 10 and year 2003 then i should display 10/31/2003.if month number 11 and year 2003 then 11/30/ can i go about doing this please help<BR>

  2. #2
    Join Date
    Dec 1969

    Default Believe it or not...

    ...even *THIS* is in the VBScript docs!<BR><BR>But since it&#039;s hard to find:<BR><BR>Left panel of this page, click on VBScript Reference (do you have it bookmarked yet??)<BR><BR>Click on FUNCTIONS<BR><BR>Click on DATESERIAL function.<BR><BR> make a long story short:<BR> DateSerial( theYear, theMonth+1, 0 ) <BR>will get it for you.<BR><BR>In other words, "day zero of the next month". Which is the same as the last day of the desired month.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts