VBScript Die DateSerial- funksie

❮ Voltooi VBScript-verwysing

Die DateSerial-funksie gee 'n Variant van subtipe Datum vir 'n gespesifiseerde jaar, maand en dag.

Sintaksis

DateSerial(year,month,day)
Parameter Description
year Required. A number between 100 and 9999, or a numeric expression. Values between 0 and 99 are interpreted as the years 19001999. For all other year arguments, use a complete four-digit year
month Required. Any numeric expression
day Required. Any numeric expression

Voorbeelde

Voorbeeld 1

<%

response.write(DateSerial(2010,2,3))

%>

Die afvoer van die kode hierbo sal wees:

2/3/2010

Voorbeeld 2

Trek 10 dae af:

<%

response.write(DateSerial(2010,2,3-10))

%>

Die afvoer van die kode hierbo sal wees:

1/24/2010

❮ Voltooi VBScript-verwysing