bas7ex.hlp (Topic list)
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.