
- VBScript Tutorial
- VBScript - Home
- VBScript - Overview
- VBScript - Syntax
- VBScript - Enabling
- VBScript - Placement
- VBScript - Variables
- VBScript - Constants
- VBScript - Operators
- VBScript - Decisions
- VBScript - Loops
- VBScript - Events
- VBScript - Cookies
- VBScript - Numbers
- VBScript - Strings
- VBScript - Arrays
- VBScript - Date
- VBScript Advanced
- VBScript - Procedures
- VBScript - Dialog Boxes
- VBScript - Object Oriented
- VBScript - Reg Expressions
- VBScript - Error Handling
- VBScript - Misc Statements
- VBScript Useful Resources
- VBScript - Questions and Answers
- VBScript - Quick Guide
- VBScript - Useful Resources
- VBScript - Discussion
VBScript Now Function
The Function Now returns the current system date and time.
Syntax
Now()
Example
<!DOCTYPE html> <html> <body> <script language = "vbscript" type = "text/vbscript"> a = Now() document.write("The Value of a : " & a) </script> </body> </html>
When you save it as .html and execute it in Internet Explorer, then the above script will produce the following result −
The Value of a : 19/07/2013 3:04:09 PM
vbscript_date.htm
Advertisements