Spreadsheet.TextDateOperation

This function performs Date operation from text variable to date variable.

Syntax Parameters Return Value
Sub Spreadsheet.TextDateOperation( _
    srcVar As Variant, _
    destVar As Variant, _
    formatStr As String, _
    transformMode As DateOperationTransformMode, _
    labelUsageMode As DateOperationUsageMode)
  • srcVar [in]

The source variable containing the labels to be converted.

Type: Variant

  • destVar [in]

The destination variable where the converted label will be placed.

Type: Variant

  • formatStr [in]

The display format of the converted label.

Type: String

  • transformMode [in]

DateOperationTransformMode specifying Transformation mode to be used.

Type: DateOperationTransformMode

  • labelUsageMode [in]

DateOperationUsageMode specifying the usage mode as either a V5 or V6 label.

Type: DateOperationUsageMode

This function does not return a value.

SVB Example

Converting text values into dates:

Option Base 1
Option Explicit
Sub Main
    'takes text labels from the first variable and places them into the second variable
    'changing the display type of variable two to Date.
    'The Windows data Format is used as the format string
    'The scVarWithTextValue2DateVar Date operation Transform mode was used, and the Date
    'operation usage mode was set to Version 6 label
    ActiveSpreadsheet.TextDateOperation("1", "2", "[WINDOW DATE FORMAT]" ,scVarWithTextValue2DateVar, scV6Label)
End Sub