判断星期的问题
dayofweek(VarToDateTime( '2007/01/17 '))
我用这个判断,判断出来的是星期四,改成别的也是多一天,不知道为什么?有知道的吗?谢谢!
[解决办法]
DayOfWeek returns the day of the week of the specified date as an integer between 1 and 7, where Sunday is the first day of the week and Saturday is the seventh.
老外的星期是从周日开始的
DayOfWeek返回1-7,7表示星期六
-_-!!!!
[解决办法]
用这个
function DayOfTheWeek(const AValue: TDateTime): Word;