Format check
A check that input follows a set pattern of characters, such as a date written DD/MM/YYYY. The right pattern does not prove the data is correct, e.g. 99/99/2025 fits the pattern.
Understanding Format check in IGCSE Computer Science Paper 2
What it does: Combining LENGTH and SUBSTRING with AND checks that the whole DD/MM/YYYY pattern is followed, because every test must be true. A format check tests the pattern of characters. Checking that a number lies between 0 and 100 is a range check. SUBSTRING(Date, 3, 1) takes 1 character starting at position 3. LENGTH returns a number, so it cannot equal "/". DD/MM/YYYY has 2 + 1 + 2 + 1 + 4 = 10 characters, including the two slashes.
Common mistakes: In DD/MM/YYYY the first slash is the 3rd character, so the check must be SUBSTRING(D,3,1). Position 2 is part of the day. When the length is not 10 the format is wrong, so V must be set to FALSE. Setting it to TRUE means a wrongly formatted date is accepted.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 47–57) and word search (Modules 47–70).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
format checkFill in the Blanks
Spot the Error
Student with a class code? Join your class →