VBScript دالة DateSerial
❮ استكمال مرجع VBScriptترجع الدالة DateSerial متغير من النوع الفرعي التاريخ لسنة وشهر ويوم محدد.
بناء الجملة
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 |
أمثلة
مثال 1
<%
response.write(DateSerial(2010,2,3))
%>
ناتج الكود أعلاه سيكون:
2/3/2010
مثال 2
اطرح 10 أيام:
<%
response.write(DateSerial(2010,2,3-10))
%>
ناتج الكود أعلاه سيكون:
1/24/2010
❮ استكمال مرجع VBScript