Función DateValue

Devuelve un valor de fecha de una cadena de fecha. La cadena de fecha es una fecha completa en un valor numérico único. También puede usar este número de serie para determinar la diferencia entre dos fechas.

Sintaxis:


  DateValue(date)

Parámetros:

Date: String expression that contains the date that you want to calculate. In contrast to the DateSerial function that passes years, months and days as separate numeric values, the DateValue function requests the date string to be according to either one of the date acceptance patterns defined for your locale setting (see - Language Settings - Languages) or to ISO date format (momentarily, only the ISO format with hyphens, e.g. "2012-12-31" is accepted).

Valor de retorno:

La fecha calculada.

Códigos de error:

5 Llamada a procedimiento no válida

Ejemplo:


  Sub ExampleDateValue
      MsgBox DateValue("23/02/2011")
  End Sub