LibreOffice 25.2 Help
Returns a Date value for a specified year, month, and day.
DateSerial (year, month, day)
Datum
Year: Integer izraz koji idicira godinu. Sve vrijednosti između 0 i 99 su dozvoljene kao godine 1900-1999. Za godine koje spadaju izvan ovog niza, morate unijeti sve četiri jedinice.
Month: Integer izraz koji inidicira mjesec specifirane godine. Dozvoljeni niz je od 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.
DateSerial funkcija vraća broj dana između decembra 30., 1899. i unesenog datuma. Možete koristiti ovu funkciju da sračunate razlike između dva datuma.
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).
Ako je datum definisan izvan dozvoljenih granica, LibreOffice Basci vraća grešku.
Gdje kad definišete DateValue funkciju kao niz karaktera koji sadrži datum, DateSerial funkcija radi evaluaciju svakog od parametara (godina, mjesec, dan) kao odvojeni numerički izrazi.
Sub ExampleDateSerial
Dim lDate As Long
Dim sDate As String
lDate = DateSerial(1964, 4, 9)
sDate = DateSerial(1964, 4, 9)
MsgBox lDate ' returns 23476
MsgBox sDate ' returns 1964-04-09 in ISO 8601 format
End Sub