Display a countdown on LCD with millis()

Hello,
I want to display a countdown on LCD with millis(), but I do not know where to update the display in the code.
I have a while-loop that has the condition of millis() not exceeding 30 seconds.
I want to update my display every 1 sec, but it does not update correctly if I place an if-statement inside the while-loop?

Thanks for your help!

Obviously, you must post your code! Please do an Auto-Format on it first (Tools menu), then post it in code tags (using the < / > icon).

You should post code by using code-tags
There is an automatic function for doing this in the Arduino-IDE
just three steps

  1. press Ctrl-T for autoformatting your code
  2. do a rightclick with the mouse and choose "copy for forum"
  3. paste clipboard into write-window of a posting

If you want ready to use code
https://www.google.de/search?as_q=arduino+lcd+count+down

best regards Stefan