Sunday, November 14, 2004

DateTime Format and .NET

The FormatDateTime() function is a powerful functions and is very easy to use.
The format function is:

FormatDateTime(date, format)

You could use:

Format DateTime(Now,”M/dd/yyyy”)

Or any other similar formatting argument.But Microsoft provides lot of predefined VBScript functions designed to reduce coding time:

When specifying the format argument, you can either type the Visual Basic constant name (name in left column), or the constant's corresponding value (0 - 4, from the middle column). They do the same thing, it's just less typing if you use the value.

I find using numbers very fast and useful. Like;
Format DateTime(Now,2)

No comments: