Article ID: 102045
Article Last Modified on 8/16/2005
PRINT FORMAT$(NOW, "mm/dd/yy") ' prints 06-23-93You can force FORMAT$ to use the slash (/) by preceding it with a backslash (\). Here's an example:
PRINT FORMAT$(NOW, "mm\/dd\/yy") ' prints 06/23/93The Visual Basic for MS-DOS Help file topic 'Sample Date and Time Formats' shows the following example, which is incorrect for the USA:
FORMAT$ Expression Display ' Will Display ------------------ ------------- ' ------------- m/d/yy 12/7/58 ' 12-7-58 m/d/yy h:mm 12/7/58 20:50 ' 12-7-58 20:50To display the expected date format, use the backslash (\) in conjunction with the forward slash (/). The backslash is an operator that displays the next character in a format string.
Additional query words: Vbmsdos kbVBp100
Keywords: kbdocfix KB102045