> VB语言在线手册 > 格式化日期和时间
<!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>