ฟังก์ชันชื่อเดือนของVBScript
❮ การอ้างอิง VBScript ที่สมบูรณ์
ฟังก์ชัน MonthName ส่งกลับชื่อของเดือนที่ระบุ
ไวยากรณ์
MonthName(month[,abbreviate])
Parameter | Description |
---|---|
month | Required. Specifies the number of the month (January is 1, February is 2, etc.) |
abbreviate | Optional. A Boolean value that indicates if the month name is to be abbreviated. Default is False |
ตัวอย่าง
ตัวอย่าง 1
รับชื่อของเดือนที่ 8:
<%
response.write(MonthName(8))
%>
ผลลัพธ์ของโค้ดด้านบนจะเป็น:
August
ตัวอย่าง 2
รับชื่อย่อของเดือนที่ 8:
<%
response.write(MonthName(8,True))
%>
ผลลัพธ์ของโค้ดด้านบนจะเป็น:
Aug
❮ การอ้างอิง VBScript ที่สมบูรณ์