ASP

ASP Variables Strings Form Arrays 2D Array Loop IF Cookies Dates Dictionaries SQL Numbers Files JSON Database Regular Expression ExecuteGlobal Recordset ServerVariables Bugs ADO AJAX XML Chilkat
O O

Weather Controls

Time Of Day
Rain
Wind Speed
Wind Direction
Clouds

ASP : Dates

2017-01-01

Dates

Format Date

response.write FormatDateTime(Now,1) //Tuesday, February 13, 2018
response.write FormatDateTime(Now,2) //2/13/2018
response.write FormatDateTime(Now,3) //2:54:52 PM
response.write FormatDateTime(Now,4) //14:55
response.write FormatDateTime(Date -1,2) //2/12/2018 'yesterday
response.write FormatDateTime(Date +1,2) //2/12/2018' 'tommorow
response.write Now //2/15/2018 10:48:12 AM
response.write(Year(Now))  //2018 (current year)

If date is older than 7 days

if DateDiff("d",FormatDateTime(now),rsLook("DateAdded")) < -7 Then
    response.write "The record is older than 7 days!"
end if