|
![](/images/resource/spacer.gif) |
|
เครื่องหมาย & กับ AND ต่างกันยังไงเหลอครับในภาษา ASP ต้องการเปรียบเทียบค่าแบบ Between |
|
![](/images/resource/viewboard_01.gif?v=1001) |
|
|
![](/images/resource/viewboard_03.gif?v=1001) |
![](/images/resource/viewboard_04.gif?v=1001) |
|
แบบนี้ใช้ได้ เปรียบเทียบแบบ Between ได้
Code
<%
request_date="25/6/2012"
below="26"&"/"&(Month(DateAdd("m",-d,request_date)))&"/"&Year(DateAdd("m",-d,request_date))
above="25"&"/"&(Month(DateAdd("m",-d+1,request_date)))&"/"&Year(DateAdd("m",-d+1,request_date))
if (request_date >= below & request_date <= above) then invoice="get receipt"
%>
แบบนี้ใช้ไม่ได้ แต่ถ้าไม่เปรียบเทียบแบบ Between ก็ใช้ได้ปกติ
Code
<%
request_date="25/6/2012"
below="26"&"/"&(Month(DateAdd("m",-d,request_date)))&"/"&Year(DateAdd("m",-d,request_date))
above="25"&"/"&(Month(DateAdd("m",-d+1,request_date)))&"/"&Year(DateAdd("m",-d+1,request_date))
if (request_date >= below AND request_date <= above) then invoice="get receipt"
%>
ขอบคุณครับ
Tag : ASP
![](/images/adv.jpg?v=1001)
|
|
![](/images/resource/blockviewtopic_01.gif?v=1001) |
![](/images/resource/blockviewtopic_02.gif?v=1001) |
![](/images/resource/blockviewtopic_03.gif?v=1001) |
![](/images/resource/blockviewtopic_04.gif?v=1001) |
Date :
2012-06-27 12:01:06 |
By :
imperator |
View :
2225 |
Reply :
1 |
|
![](/images/resource/blockviewtopic_06.gif?v=1001) |
![](/images/resource/blockviewtopic_07.gif?v=1001) |
![](/images/resource/blockviewtopic_08.gif?v=1001) |
![](/images/resource/blockviewtopic_09.gif?v=1001) |
|
|
|
![](/images/resource/viewboard_06.gif?v=1001) |
![](/images/resource/viewboard_07.gif?v=1001) |
|
![](/images/resource/viewboard_08.jpg?v=1001) |
![](/images/resource/viewboard_09.gif?v=1001) |
|
|
![](/images/digitalocean-banner.jpg)
|
Load balance : Server 03
|