
How to show monday of this week on a form
I am new at ASP. I had to add a date format to a form that employees print
out any day of the week. It always has to show the Monday and Friday of the
current workweek whether the form is printed Monday, Sunday, Thursday, etc.
I did this below and so far it works fine but I am not sure why.
<%
Dim KcmDate, MonDay, FriDay
KcmDate = CDate(FormatDateTime(Now,2))
MonDay = KcmDate + 1 - (WeekDay(KcmDate, vbMonday))
Friday = MonDay + 4
%>
For the week of Monday <%Response.Write (MonDay) & " - Friday " & (Friday)%>
Any other simpler ideas to do the same thing?
ken miller