Hàm VBScript WeekdayName
❮ Toàn bộ tài liệu tham khảo VBScript
Hàm WeekdayName trả về tên ngày trong tuần của một ngày cụ thể trong tuần.
Cú pháp
WeekdayName(weekday[,abbreviate[,firstdayofweek]])
Parameter | Description |
---|---|
weekday | Required. The number of the weekday |
abbreviate | Optional. A Boolean value that indicates if the weekday name is to be abbreviated |
firstdayofweek | Optional. Specifies the first day of the week. Can take the following values:
|
Các ví dụ
ví dụ 1
Nhận tên ngày thứ 3 trong tuần:
<%
response.write(WeekdayName(3))
%>
Đầu ra của đoạn mã trên sẽ là:
Tuesday
Ví dụ 2
Nhận tên ngắn gọn của ngày thứ 3 trong tuần:
<%
response.write(WeekdayName(3,True))
%>
Đầu ra của đoạn mã trên sẽ là:
Tue
Ví dụ 3
Lấy tên của ngày thứ 3 trong tuần, trong đó ngày đầu tiên là thứ hai:
<%
response.write(WeekdayName(3,False,2))
%>
Đầu ra của đoạn mã trên sẽ là:
Wednesday
❮ Toàn bộ tài liệu tham khảo VBScript