n********6 发帖数: 1511 | | n********6 发帖数: 1511 | 2 LOGIC:
Today = DateDiff("d", "01/01/1900", Date())
CurrentWeekDay = (Today Mod 7) + 1
FirstWeekDay = DateAdd("d", Today-CurrentWeekDay, "01/01/1900")
LastWeekDay = DateAdd("d", Today+6-CurrentWeekDay, "01/01/1900")
SELECT * FROM TABLEA
WHERE TRANSACTIONDATE >= FIRSTWEEKDAY
AND TRANSACTIONDATE <= LASTWEEKDAY
/* works in asp */
Any simple method? |
|