Article ID: 183049
Article Last Modified on 8/27/2007
<% FullDate = Month(date) & "/" & Day(date) & "/" & Year(date)
' FullDate is the combination of the exact Month, Day and Year.
' It will be used to assign the value of the hidden field.
%>
174008 FP98: What are Active Server Pages?
174015 FP98: How to Create Active Server Pages in FrontPage 98
// Give the function a name so the onSubmit event for the submit
// button can call it.
function FullYear () {
// Create a variable called ddate that will contain the current
// date on the client system.
var ddate= new Date();
// Create a variable called year that will contain the current
// year on the client system. Note that the JavaScript getYear method
// will return values 0 through 99 for years 1900 through 1999, but
// it will return 2000 or higher for years above 2000.
var year=ddate.getFullYear()
// Analyze the current year, and if it is less than 100 (year 2000),
// then add 1900 to it.
if (year > 100) {year = (year + 1900)}
// Specify that the return value of the function FullYear shall be a
// text string in the form of m/d/yyyy. The month portion is the
// result of the getMonth method that returns 0 for January and 11
// for December. Add one to that value for the common representation
//of a month. The date portion is the result of the getDate method,
// and the year portion is the result of the calculation within the
// if condition in the line above.
return ((ddate.getMonth() + 1)+ "/" + ddate.getDate()+ "/" + year);
}
<input type="submit" value="Submit" name="B1">
onClick="DateStamp.value=FullYear()"
<input type="submit" value="Submit" name="B1" onClick="DateStamp.value=FullYear()">
<input type="hidden" name="DateStamp">
Additional query words: y2k fpscript 98 asp
Keywords: kbinfo KB183049