DateSerial Function
Returns a Date value for a specified year, month, and day.
DateSerial(jaro, monato, tago)
Dato
Year: Entjera esprimo kiu signifas jaron. Äiuj valoroj inter 0 kaj 99 interpretiÄas kiel jaroj 1900-1999. Por jaroj ekster tiu amplekso, necesas enmeti Äiujn kvar signojn.
Month: Entjera esprimo kiu signifas la monaton de la specifita jaro. La akceptebla amplekso estas 1-12.
Day: Integer expression that indicates the day of the specified month. The accepted range is from 1-31. No error is returned when you enter a non-existing day for a month shorter than 31 days.
La funkcio DateSerial liveras la nombron da tagoj inter la 30a decembro 1899 kaj la donita dato. La funkcio estas uzebla por kalkuli la diferencon inter du datoj.
The DateSerial function returns the data type Variant with VarType 7 (Date). Internally, this value is stored as a Double value, so that when the given date is 1900-01-01, the returned value is 2. Negative values correspond to dates before December 30, 1899 (not inclusive).
Se la cela dato troviÄas ekster la akceptebla amplekso, Collabora Office Basic liveras prieraran mesaÄon.
Kvankam oni difinas la funkcion DateValue kiel Äenon kiu enhavas la daton, la funkcio DateValue kalkulas Äiun parametron (jaron, monaton, tagon) kiel apartajn numerajn esprimojn.
Sub ExampleDateSerial
Dim lDate As Long
Dim sDate As String
lDate = DateSerial(1964, 4, 9)
sDate = DateSerial(1964, 4, 9)
msgbox lDate REM liveras 23476
MsgBox sDate ' returns 1964-04-09 in ISO 8601 format
End Sub