Wednesday, 4 July 2012

Ex23: Format Date and Time in VBScript


<!DOCTYPE html>
<html>
<body>


<script type="text/vbscript">
document.write(FormatDateTime(Date(),vbGeneralDate))
document.write("<br />")
document.write(FormatDateTime(Date(),vbLongDate))
document.write("<br />")
document.write(FormatDateTime(Date(),vbShortDate))
document.write("<br />")
document.write(FormatDateTime(Now(),vbLongTime))
document.write("<br />")
document.write(FormatDateTime(Now(),vbShortTime))
</script>


<p>Syntax for FormatDateTime: FormatDateTime(Date,namedformat).</p>


</body>
</html>

No comments:

Post a Comment