我做了个每天都自动运行的程序,但我想不让它在星期六、日运行,这怎么做呢,可能要用到判断星期六、日的函数,但我不知道怎么写,有谁知道吗?

解决方案 »

  1.   

    function WeekOf(const AValue: TDateTime): Word;
    返回是星期几, 根據這個日期, 就可用function IncDay(const AValue: TDateTime; const ANumberOfDays: Integer = 1): TDateTime;增加, 減少相應的日期就可了
      

  2.   

    用Delphi自带的DayofWeek函数,忘记会不会是TheDayOfWeek了,总之按F1看看就知道
      

  3.   

    恩!!不错!!WeekOf 其实这个函数就可以的
      

  4.   

    function DayOfWeek(Date: TDateTime): Integer;DescriptionDayOfWeek 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.
      

  5.   

    julong is good. 
    up
      

  6.   

    DayOfWeek(Date) = 1 就是星期天DayOfWeek(Date) =7就是星期六