Thread: Day of the Week

    #1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Location
    Italy
    Posts
    63
    Rep Power
    12

    Day of the Week


    Hello, I'm creating a program that will display me the different text depending on the day. I found that i can use this:
    Code:
    function DayOfTheWeek ( const Date  : TDateTime ) : Integer;
    but when i use it i got the error:
    Unsatisfied forward or external declaration: 'TForm1.DayOfTheWeek'

    This is my code:

    Code:
    procedure TForm1.FormCreate(Sender: TObject);
    var
    myDate : TDateTime;
    day    : array[1..7] of string;
    begin
      day[1] := 'Monday';
      day[2] := 'Tuesday';
      day[3] := 'Wednesday';
      day[4] := 'Thursday';
      day[5] := 'Friday';
      day[6] := 'Saturday';
      day[7] := 'Sunday';
    
    Label3.Caption := day[DayOfTheWeek(myDate)];
    
    end;
    What's wrong?
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Location
    Italy
    Posts
    63
    Rep Power
    12
    no, sorry, i solved it

IMN logo majestic logo threadwatch logo seochat tools logo