Trying to make a simple day count

I am trying to make a counter using the millis function. The for statment seem to ignore the millis function and only prints 15 i'm sure is because i don't know how it works although it looks simple. i tried to move the for statment to the top and bottom and diffrent places in the middle. If some one can look at this and tell me where i messed up or even if it will work at all
Thank
here is my code

void daycounter(){ //function call in setup
int i;
const unsigned long interval = 10000; // interval at which to blink (milliseconds)
unsigned long currentMillis = millis();
unsigned long previousMillis = 0;

{
if (currentMillis - previousMillis >= interval);
{
for (i = 0; i < 15; i++); //trying to increment 1 to 15 based on millis

 previousMillis = currentMillis; 

}
}

Serial.begin(9600);
lcd.init();
lcd.backlight();
lcd.blink();
lcd.setCursor(2,1),
lcd.print("start"), // so i could tell that loop started over
delay(1000);
lcd.clear();
//Print day on display
delay(1000);

  //int i;   //Trying to increment count from 1 to 15
 //for (i = 1; i < 16; i++){
  delay(2000);  //Just trying to slow thing down 
 lcd.clear();
 lcd.setCursor (0,0);
lcd.print("DAY (");
 lcd.print(i);
 lcd.print(")");
 Serial.println(i);   //just to debug

}

  1. List item

Lose the

;

Some comments:

void daycounter()  //function call in setup
{
  int i;
  const unsigned long interval = 10000; // interval at which to blink (milliseconds)
  unsigned long currentMillis = millis();
  unsigned long previousMillis = 0;  //// This is not 'static' so it will be reset each call

  { ///// Unnecessary open-bracket

    //// Does nothing because the body of 
    //// 'if' statement is one null statement: ';'
    if (currentMillis - previousMillis >= interval)
      ;

    { //// Unnecessary open-bracket

      //// This loop does nothing 15 times because
      //// the body of the loop is one null statement: ';'
      for (i = 0; i < 15; i++)
        ; //trying to increment 1 to 15 based on millis

      previousMillis = currentMillis;

    } ///// close-bracket matching unnecessary open-bracket

  } ///// close-bracket matching unnecessary open-bracket

  Serial.begin(9600);
  lcd.init();
  lcd.backlight();
  lcd.blink();
  lcd.setCursor(2, 1),   /////  This comma should have been a semicolon
                lcd.print("start"),   /////  This comma should have been a semicolon
                // so i could tell that loop started over
                delay(1000);
  lcd.clear();
  //Print day on display
  delay(1000);

  //int i;   //Trying to increment count from 1 to 15
  //for (i = 1; i < 16; i++){
  delay(2000);  //Just trying to slow thing down
  lcd.clear();
  lcd.setCursor (0, 0);
  lcd.print("DAY (");
  lcd.print(i);
  lcd.print(")");
  Serial.println(i);   //just to debug
}

Still confused when i make sketch with the for statement for (i=0; 1 <15;i++);
my display shows DAY () and inside the parentheses it counts from 1 to 15 when i try to add the miiliis functions all that is display DAY (15). I did not under stand about the for statement being null. i am very new to this programing those {} and : are sometimes hard to figure out. any way i am very grateful for you help may be soon i will get a hold on this i am working on a big project and i am beginning to think i may have taken on to much, but as they say no guts no glory. and i have no time line to worry a bout. Again thanks

Get rid of the semicolon.

;

Because of various mistakes, what your function does is:

  1. Display "start" for 1 second.
  2. Go blank for 3 seconds.
  3. Display "DAY (15)".

Below is what is left after the parts that do nothing are removed.

void daycounter()  //function call in setup
{
  int i;
  i = 15;

  Serial.begin(9600);
  lcd.init();
  lcd.backlight();
  lcd.blink();
  lcd.setCursor(2, 1);
  lcd.print("start");
  delay(1000);
  
  lcd.clear();
  delay(1000);
  delay(2000);  //Just trying to slow thing down
  
  lcd.clear();
  lcd.setCursor (0, 0);
  lcd.print("DAY (");
  lcd.print(i);  // always 15
  lcd.print(")");
  
  Serial.println(i);   //just to debug
}

Still having problems with millis function. Every youtube video i have watched and rewatched and watched again all say the same thing. Once the arduino starts so does the millis counter. if you want an event to happen every second then you up date the current mllis to the previous mills and the if statement s starts again.below is my code and serial monitor results. i do not under stand what is going on. thanks for you help

const unsigned long interval = 2000;
unsigned long previousMillis = 0;
unsigned long currentMillis = millis();
if (currentMillis - previousMillis >= interval){

Serial.println(" hello ");
previousMillis = currentMillis;
}

12:03:14.427 -> current =1929 previous =0
12:03:14.474 -> current =1956 previous =0
12:03:14.474 -> current =1984 previous =0
12:03:14.521 -> hello
12:03:14.521 -> current =2013 previous =2013
12:03:14.568 -> hello
12:03:14.568 -> current =2054 previous =2054
12:03:14.615 -> hello
12:03:14.615 -> current =2096 previous =2096
12:03:14.662 -> hello
12:03:14.662 -> current =2138 previous =2138
12:03:14.662 -> hello

As you can see untill millis reaches 2 seconds it does not print hello, but every time after 2 seconds current = previous which should return false the if statement should skip over print hello untill millis gets to 2000 seconds.
at least thats my understanding Let me know if i am wrong thanks
David

Try:
static unsigned long previousMillis = 0;