Built-in Functions
ASP provides a number of built-in date-related functions that can be used to find the current date and time. The three most common functions are date(), time(), and now().
FormatDateTime Function
The FormatDateTime function can be used to format the results from the date-related function. You can pass an optional integer ranging from 0 through 4.
0 – This is the default setting.1 – long date defined by the regional settings.2 – short date defined by the regional settings.3 – time format defined by the regional settings.4 – time format using military time HH:MM.
Date and Time Functions
ASP (VBScript) also provides a number of date- and time-related functions that are very useful. The DatePart function is also very useful. It allows you to retrieve a specific part of a date/time value.