Skip to content

Field notes

Start and End Times: Why a Log Entry Is a Span, Not a Moment

Some entries happen at an instant and some take time. Recording a start and an end, and saying which kind you have, keeps a log readable months later.

datareferenceprecision
The Optimized Team· ProductUpdated Nov 17, 2026

Some entries in a log happen at an instant, and some take time. If you store one timestamp for both, you lose the difference. Apple's HealthKit, the framework behind Apple Health, gives every sample a start and an end, and that habit is worth borrowing for any personal log. This article covers the two kinds of entry, what goes wrong with a single time, and what to record instead.

Two kinds of entry, two kinds of time#

HealthKit describes each sample as a piece of data associated with a start and end time. Whether the entry is an instant or a stretch depends on the two values. If the start and end are the same, the sample represents a point in time. If the end is after the start, it represents a time interval, as the Samples overview puts it.

A point in time#

Apple's own example of a point is body temperature. For that kind of sample, both the start and the end date are the same, because they both refer to the moment the reading was taken. A single weigh-in or a single lab draw works the same way. One moment, one time.

A span#

Apple's example of an interval is step count. Steps accumulate over a stretch of time, so the sample uses a different start and end to mark where that stretch begins and finishes. The rule that holds in both cases: the start must be equal to or earlier than the end.

Here is how some common log entries sort out:

| Entry | Point or span | What to store | | --- | --- | --- | | A morning weigh-in | Point | One time | | A blood draw | Point | One time (see collection date or report date) | | A night of sleep | Span | Start and end | | A walk | Span | Start and end | | A symptom that lasted all afternoon | Span | Start and end, or start and a note that the end is unknown |

Your own list will differ. The point is to decide per entry type, once, and then stick with it.

Why one timestamp is not enough#

A single time on a span forces a guess. Does it mark the start, the end, or the middle? Whoever reads the log later, including you, cannot tell. Six months on, a sleep entry stamped 7:00 a.m. could mean you woke at 7:00 or fell asleep at 7:00, and nothing in the row settles it.

Sorting depends on which time you use#

HealthKit lets you sort samples by start date or by end date, and offers a separate sort constant for each. That detail matters because two spans can overlap. A long entry that starts early and ends late sits in a different place depending on which time you sort by. If your log has only one time column, you have already picked an order without saying so. It's a quiet choice, like the one in logging in the moment versus at the end of the day: how you capture an entry shapes what the record shows later.

Some spans have no known end#

HealthKit includes a flag, hasUndeterminedDuration, for a sample whose duration is unknown. The idea carries over directly. If you do not know when something ended, say so. Do not set the end equal to the start, because that reads as "this was an instant," which is a claim you did not make. A blank end, plus a short note, says what you actually know. This is the same reasoning as keeping a blank different from a zero.

Fixed once created#

HealthKit samples are immutable: you set the properties when you create the sample, and they cannot change. You do not have to be that strict in a spreadsheet or app, but the discipline is useful. If a start or end time turns out to be wrong, add a correction note with the date you fixed it, instead of silently overwriting the original. Then the log shows both what you first recorded and what you later learned.

Reading a span back later#

A span changes how you read a row. A 40-minute entry and a 4-hour entry are different kinds of evidence, even if their start times are identical. When you scan a log for a pattern, such as which days have an entry at all, the start time alone answers one question and the end time answers another. Keep both visible in the view you actually use, not buried in a detail screen.

It also helps to remember what the times cannot tell you. A start and an end say when something was logged as beginning and finishing. They do not say how accurate your clock was, whether you rounded to the nearest five minutes, or whether you entered the times from memory. Self-reported times are noisy, and a tidy-looking column can suggest more precision than the entries have. Where you rounded, say so in the note, and read small differences between spans as within the noise.

What to record for a span#

Keep it small and consistent:

  • Two time fields, or start plus length. Pick one form and use it for every span. Mixing "start and end" on some rows with "start and duration" on others makes comparison harder.
  • A field that says point or span. One short column removes any doubt about whether an equal start and end was deliberate.
  • A blank for an unknown end. Do not fill it with a guess. Add a note if you can say roughly why it is unknown.
  • The same time zone throughout, or the zone written down. A span that crosses midnight or a time change is easy to misread without it.
  • How the time was captured. Noting whether you entered the times as it happened or later tells a future reader how much weight to give them.

None of this interprets the entry. It only keeps the time information honest, so that when you look back you can tell what each row was claiming.

Conclusion#

An entry is a moment or a span, and your log should say which. Store a start and an end, mark the kind, leave unknown ends blank, and correct mistakes with notes rather than overwrites. That's a small amount of structure. It keeps a log sortable and unambiguous long after you've forgotten the details. For more on what Apple Health stores per entry, see what an Apple Health export file contains.

Share

X / Twitter