David wrote:
Hi,
Quick question:
Using ASP, If I have a text box on a form, how can I auto populate it
when the form loads with the date of the current Friday, i.e.
dd/mm/yyyy
What do you consider to be the current Friday? 2004-10-29? Or 2004-11-5?
I will assume it to be the first Friday to follow the current date.
<%
dim today,curFri
curFri=date()
do until weekday(curFri) = vbFriday
curFri= dateadd("d",1,curFri)
loop
curFri = left("0" & day(curFri),2) & "/" & left("0" & month(curFri),2) & _
"/" & year(curFri)
%>
<input value="<%=curFri%>">
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"