Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
FormatX$, Now# Programming Example
◄Example► ◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
'This example uses the FormatD$ function to format date and time
'information. The current date and time are returned as a serial
'number by the Now# function.
'Note: To run this example you must use a Quick library that includes
'the procedures contained in the date/time/format library files. The
'following include files must also be present.
'$INCLUDE: 'DATIM.BI'
'$INCLUDE: 'FORMAT.BI'
CLS
PRINT "Today's date is "; FormatD$(Now#, "dd-mmm-yy"); "."
PRINT "The correct time is "; FormatD$(Now#, "hh:mm:ss AM/PM"); "."
'Sample output
'
'Today's date is 02-May-1989.
'The correct time is 2:22:14 PM.