Recommended: ASP summary of page cache clearing methods Every time I go to Chinaasp, many netizens always ask how to refresh the Asp page. Under the management of IIS4, the problem of not refreshing the page is much more serious than that of IIS5, and sometimes some statements that control page cache still do not work. I'm not very clear about the reason, go and ask Microsoft:-) Now I will summarize some methods of clearing page cache as follows: 1. Add at the beginning of the Asp page
Returns the date when the specified time interval has been added.
DateAdd(interval, number, date)
parameter
interval
Required option. A string expression that indicates the time interval to be added. For values, see the Settings section.
number
Required option. Numeric expression, indicating the number of time intervals to be added. Numeric expressions can be positive (get future dates) or negative (get past dates).
date
Required option. Variant or text that represents the date to add interval.
set up
The interval parameter can have the following values:
Setting Description
yyyy year
q Quarterly
m month
y Number of days in one year
d Day
w Number of days of a week
ww
h hours
n minutes
s seconds
illustrate
The DateAdd function can be used to add or subtract the specified time interval from the date. For example, DateAdd can be used to calculate the date 30 days from the same day or to calculate the time 45 minutes from the present day. To add a time interval in days to date, you can use the number of days (y), days (d) of one year, or the number of days (w) of a week.
The DateAdd function does not return an invalid date. The following example adds January 31, 2019:
NewDate = DateAdd(m, 1, 31-Jan-95)
In this example, DateAdd returns February 28, 2019, instead of February 31, 2019. If date is January 31, 2019, it returns February 29, 2019, because 1996 is a leap year.
An error occurs if the calculated date is before 100 AD.
If number is not a Long value, rounded to the closest integer before calculation.
eg:
Problem of calculating date difference in asp
<%
fzdxsj= #2006-07-01# 'The past time or 2006-7-1 is also OK!
data=DateDiff(d,fzdxsj,date)
response.Write(<br /><br />Before 2006-7-1&data&day<br />)
'Setting Description
'yyyy
'q Quarterly
'm month
'y Number of days in one year
'd day
'w The number of days of the week
'ww week
'h hours
'n minutes
's seconds
response.Write(add month, year, day, time==<br />)
NewDate = DateAdd(m, 1, 31-Jan-95)
response.Write(NewDate)
%>
<script language=vbscript>
document.write DateAdd(d, -15, 2002-11-08)
</script>
<%
today=day(date())
newd=DateAdd(d,15,dateserial(year(date()),month(date()),today))
response.write newd
%>
Share: iis7 and iis8 configuration backup and restore tutorial Method 1: 1. Open our IIS Manager, find the shared configuration function in the function view and double-click to enter. 2. After entering the shared configuration, the export configuration option in the upper right of the stand-alone machine is selected, and then set a password. The password must be a strong password containing numbers, symbols, upper case letter combinations and at least 8 characters long. Confirm the export.