Funció DateValue

Torna un valor de data d'una cadena de data. La cadena de data és una data completa en un únic valor numèric. També podeu utilitzar aquest número de sèrie per a determinar la diferència entre dues dates.

Sintaxi:


DateValue [(date)]

Valor de retorn:

Data

Paràmetres:

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).

Codis d'error

5 La crida al procediment no és vàlida

Exemple:


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

Ens cal la vostra ajuda!