Bee Learnt Logo
Bee Learnt
FeatureBrowse allPricingAboutSupport
Bee Learnt

Bee Learnt gives South African Grade 10–12 learners a cleaner route from classwork to NSC readiness — with parents and tutors supporting the journey.

WhatsApp: 0685537312

Support email: admin@beelearnt.co.za

Learn
FeaturesBrowse subjectsPricing
Get started
Create accountSign inContact support
Company
About Bee LearntAdvertisingContact
Legal
Privacy policyTerms of serviceCookie policyAd choices

© 2026 Bee Learnt. All rights reserved.

CAPS aligned · Grades 10–12 · NSC ready

Privacy choices

Allow analytics and advertising services to help us understand site usage and measure campaigns.

Privacy Policy
  1. Subjects
  2. /
  3. Information Technology
  4. /
  5. Information Technology Grade 12 — Practical
  6. /
  7. Control flow and strings
  8. /
  9. Delphi date and time functions
Grade 12 · Practical

Delphi date and time functions

Control flow and strings · about 3 min

Educational overview for Delphi date and time functionsVisual overview: Delphi date and time functions
1 MIN READ
2 study sections · pause after each one and recall the key idea

Delphi represents dates and times as a TDateTime. A family of functions reads, calculates with, and formats them.

Key points
  • `Now` = current date+time; `Date` = today; `Time` = current time.
  • `DaysBetween`, `MonthsBetween`, `YearsBetween` (Math/DateUtils unit) measure spans — e.g. a person's age.
  • `FormatDateTime('yyyy-mm-dd', d)` produces a formatted string for display.
  • Add the `DateUtils` unit to the uses clause for the Between functions.
Key terms
  • TDateTime — Delphi's date/time value type.
  • FormatDateTime — formats a TDateTime as a readable string.
EXAM TIP

to compute age, use `YearsBetween(Now, dob)`; remember to add DateUtils to uses.


Previous

String processing and safe indexing