DateAdd function in Frontpage

  • Thread starter Thread starter Wayne-I-M
  • Start date Start date
W

Wayne-I-M

Hi

I would like to have a text box on a form (asp) showing something like
"Must be after February 2010"
This would be for forms shown during 2009.
So the date (year) would be this year +1

Is this possible in frontpage?

Sort of the same as the access function DateAdd
="Must be after "&Format(DateAdd("Y", 1, Date()),"mmm yyyy"
I know this will not work in frontpage, just an example
 
If you always want 1 year from the current date
- In a .asp page it would be
<%
NewDate=DateAdd("Y", 1, Date())
DateText="Must be after " & MonthName(Month(NewDate)) & " " Year(NewDate)
Response.Write DateText
%>
See the VBscript references DateAdd, MonthName,Month, and Year at:
http://www.devguru.com/technologies/vbscript/quickref/vbscript_list.html

Or, since you don't care about the day, you could just do
<% = "Must be after " & MonthName(Month(Date()) & " " Year(Date())+1 %>




_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


Hi

I would like to have a text box on a form (asp) showing something like
"Must be after February 2010"
This would be for forms shown during 2009.
So the date (year) would be this year +1

Is this possible in frontpage?

Sort of the same as the access function DateAdd
="Must be after "&Format(DateAdd("Y", 1, Date()),"mmm yyyy"
I know this will not work in frontpage, just an example
 
Back
Top