← IGCSE Computer Science Paper 1

Time-stamp

The date and time added to a record when it is created, showing when it was made. It puts records in order and shows which happened first.

Understanding Time-stamp in IGCSE Computer Science Paper 1

What it does: NOW() gives the current date and time, which is stored in the record at the moment it is created. Ascending order of time-stamps lists the earliest transaction first, so the order of events is clear. The date and time of the transaction is the time-stamp. 09:15 is earlier than 09:20, so record A was made first. Without the time, records made on the same day look equal, so you cannot tell which happened first.

Common mistakes: A time-stamp must be the date and time the record was made, so it should be set with NOW(). A person's name is not a time-stamp. The time-stamp must show exactly when the record was created. Adding 7 to it changes the time, so it should be timestamp ← NOW().

Class: _____________________  ·  Name: _____________________  ·  Date: _________

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 510–519) and word search (Modules 510–546).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
What does a time-stamp on a transaction record show?
The amount of money that was sentThe date and time the record was made
Matches
transaction ← {from: Ava, to: Liam, amount: 50}
↓
The transaction has no time-stamp, so nobody can tell when it was made or which happened first
Applying
Meanings
Term
time-stamp
Meaning
The date and time added to a record when it is created, showing when it was made. It puts records in order and shows which happened first.
Practice
Transaction: 0417
Testing
Gaps
transaction.timestamp ← ()
Check Answer
Spots
1timestamp ← "Alice"
2amount ← 25

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Hyena' badge — Savannah Debugger, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. What does a time-stamp on a transaction record show?
A. The amount of money that was sent
B. The date and time the record was made ✓
A time-stamp is the date and time added to a record to show when it was made. The amount is stored in a separate part of the record.
2. When is the time-stamp added to a record?
A. When the record is created ✓
B. Only after the record is deleted
The time-stamp is added at the moment the record is created, so it shows when the transaction was made.
3. Two transactions have different time-stamps. What can you work out from them?
A. Which transaction happened first ✓
B. Which transaction was for more money
Time-stamps show which record happened first. They say nothing about the size of the payment.
4. How do time-stamps help a ledger?
A. They put the records in order ✓
B. They stop anyone from reading the records
Because each record has a date and time, the records can be placed in the order they happened.
5. A transaction was made at 14:32 on 3 March. Which part of the record is this?
A. The sender's wallet
B. The time-stamp ✓
The date and time of the transaction is the time-stamp.

Match the Pairs

timestamp: 2026-02-03 14:05:09 → The date and time added to a record to show exactly when it was made
IF stamp_A < stamp_B THEN first ← A → Comparing time-stamps to find which record happened first
A time-stamp is added when the record is created, so it shows when the transaction was made → record.timestamp ← NOW()
Sorting records by their time-stamps puts them in order, oldest first → SORT records BY timestamp ASCENDING
transaction ← {from: Ava, to: Liam, amount: 50} → The transaction has no time-stamp, so nobody can tell when it was made or which happened first
timestamp: 2026-02-03 (date only) → A time-stamp must include the time as well as the date, otherwise two transactions on the same day cannot be put in order

Key Term

time-stamp
The date and time added to a record when it is created, showing when it was made. It puts records in order and shows which happened first.

Fill in the Blanks

1. transaction.timestamp ← NOW()
Hint: Type the function name that returns the current date and time.
2. IF t1.timestamp < t2.timestamp THEN OUTPUT "t1 happened first" ENDIF
Hint: Type the comparison operator meaning 'earlier than', so the smaller time-stamp happened first.
3. SELECT * FROM ledger ORDER BY timestamp ASC
Hint: Type the keyword that puts the records in order with the earliest first.
4. DECLARE timestamp : DATE timestamp ← NOW()
Hint: Type the data type used to store a date.
5. newRecord ← CreateRecord(amount) newRecord.timestamp ← NOW() APPEND(ledger, newRecord)
Hint: Type the field name that stores when the record was made, set as the record is created.

Spot the Error

Question 1
A timestamp ← "Alice"
B amount ← 25
C record ← [timestamp, amount]
D OUTPUT record
Line A — A time-stamp must be the date and time the record was made, so it should be set with NOW(). A person's name is not a time-stamp.
Question 2
A sender ← "Ava"
B receiver ← "Ben"
C amount ← 10
D timestamp ← NOW() + 7
E OUTPUT timestamp
Line D — The time-stamp must show exactly when the record was created. Adding 7 to it changes the time, so it should be timestamp ← NOW().
Question 3
A FUNCTION AddRecord(amount)
B record.amount ← amount
C record.time ← "unknown"
D RETURN record
E ENDFUNCTION
Line C — The time-stamp is added when the record is created and must hold the real date and time. It should be record.time ← NOW(), not the text "unknown".
Question 4
A timeA ← "09:15"
B timeB ← "09:20"
C IF timeA > timeB THEN
D OUTPUT "A happened first"
E ENDIF
Line C — The earlier time-stamp shows which record happened first. A (09:15) is earlier than B (09:20), so the test should be timeA < timeB.
Question 5
A timeA ← "10:05"
B timeB ← "10:02"
C IF timeB < timeA THEN
D OUTPUT "A was made first"
E ENDIF
Line D — The condition checks that B's time-stamp is earlier than A's, so B was made first. The output should say "B was made first".

Student with a class code? Join your class →