Time+and+Date

toc =Time= The current time is returned by the time$ function. It returns a string in the format

hours:minutes:seconds am/pm

Note that it includes the designation for am or pm.

code format="vbnet" print time$ code

The output looks like this:

To display the number of seconds since midnight, use time$("seconds") like this:

code format="vbnet" print time$("seconds") code

The output looks like this:

To display the number of milleseconds since midnight, use time$("milleseconds") like this:

code format="vbnet" print time$("milleseconds") code

Or

code format="vbnet" print time$("ms") code

The output looks like this:

=Date= The current date is returned by the date$ function. It returnes a string in the format

mm/dd/yy

code format="vbnet" print date$("mm/dd/yyyy") code

The output looks like this:

If you want to display the full year, use this string inside the date function - "mm/dd/yyyy":

code format="vbnet" print date$("mm/dd/yyyy") code

The output looks like this:

To display the days since January 1, 1901:

code format="vbnet" print date$("days") code

The output looks like this: