Funzione DateValue

Restituisce un valore di data a partire da una stringa di data. La stringa di data è una data completa espressa con un unico valore numerico. Potete anche usare questo numero di serie per determinare la differenza tra due date.

Sintassi:


DateValue [(date)]

Valore restituito:

Data

Parametri:

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

Codici di errore:

5 Richiamo di procedura non valido

Esempio:


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