VBScript TutorialIntroductionVBScript Editors VBScript Syntax VBScript Variables VBScript Arrays VBScript Date VBScript If Statements VBScript Select Case VBScript While Loop VBScript For Loop VBScript Operators VBScript Functions Summary
Sponsored Links
$1.99 Domain Names
With every new non-domain purchase thru ZappyHost, you get a domain name for only $1.99. |
VBScript DateTo display the date using VBScript, you use the VBScript date() function.
VBScript Date CodeTo display this to the user, you need to output it like you would anything else - for example, using the document.write() method.
Or even better, you could put the date into a variable first, then output the variable:
Both these result in: Note: If this is blank, your browser probably doesn't support VBScript. Try using Internet Explorer. VBScript Date FormatYou can use the VBScript FormatDateTime() method to format the date to either a long date format or a short date format. The FormatDateTime() method accepts two arguments: The date being formatted, and the required format (indicated by a constant). The formats are specified as follows:
Long FormatTo use long date format, you pass the FormatDateTime() an argument of 1.
This results in: Short FormatTo use long date format, you pass the FormatDateTime() an argument of 2.
This results in: |
Sponsored Links
Need Website Content?
Get unique, quality digital content for your website.
|