Example

Format Numeric and Date Fields.


Format Numeric and Date Fields code snippet.

The following is a simple example of how to format numeric and date fields in a grid control.  The code snippet assumes you have a DGrid control named "DGrid1" sited on the form.


    'Format the second column in the grid to a date.
    DGrid1.Cols(1).NumFormat = "mm/dd/yyyy"
    'Format the third column in the grid to currency.
    DGrid1.Cols(2).NumFormat = "$#,##0.00"