Clean Excel dates and calculate a duration

Autor: AILesson6 Min. EinrichtungszeitGetestet mit:ChatGPTGeprüft am: 2026-08-28

Schnelle Antwort

Normalize mixed date inputs before calculating calendar or working time. Angeben: Observed date values, Columns and desired result, Duration rules. Erwartetes Ergebnis: A safe conversion and duration method with locale and boundary tests.

1

Kontext hinzufügen

Dein Text bleibt in diesem Browser. AILesson Prompts sendet ihn nicht an ein Modell oder einen Server.

2

Dein Prompt

Nicht ausgefüllte Felder bleiben als Platzhalter sichtbar, sodass du den Prompt weiterhin kopieren und bearbeiten kannst.

Design a safe Excel method to normalize dates and calculate duration.

Observed inputs:
[inputs]

Workbook layout and desired result:
[layout]

Duration rules:
[rules]

First distinguish real Excel serial dates from text and identify ambiguous locale-dependent values. Do not guess whether 03/04 means March 4 or April 3. Propose helper columns for normalization and validation before duration calculation. Return formulas, cell formats, invalid-value flags, and tests for blanks, timestamps, reversed dates, leap days, and boundary inclusion. State whether the result is elapsed time, calendar days, or working days.
Im Playground ausprobieren
Standardmäßig privatDer Prompt wird lokal in deinem Browser zusammengestellt. Gib keine vertraulichen Informationen in einen KI-Dienst ein, es sei denn, deine Organisation erlaubt dies.

Von der Eingabe zum Ergebnis

Ein ausgearbeitetes Beispiel

Sieh dir an, wie konkreter Kontext dieses Rezept in ein nutzbares Ergebnis verwandelt.

Tatsächliche Eingabe

Observed date values
B contains real Excel dates or ISO text such as 2026-02-27; C contains real dates, ISO text, or blank for open cases. Values like 03/04/2026 may occur and must be flagged as ambiguous. Some cells include timestamps.
Columns and desired result
B: Started; C: Completed; D: Clean Start; E: Clean Complete; F: Calendar Days. Data starts at row 2.
Duration rules
Use 1 March 2026 for open cases in this fixed report. Count elapsed calendar days, so same-day completion is 0. Preserve timestamps only long enough to remove them. Reversed dates must show Review.

Beispielausgabe

Use helper columns so conversion problems remain visible.

D2 clean start: =IF(B2="","",IF(ISNUMBER(B2),INT(B2),IF(AND(LEN(B2)=10,MID(B2,5,1)="-",MID(B2,8,1)="-"),DATE(LEFT(B2,4),MID(B2,6,2),RIGHT(B2,2)),"Review")))

E2 clean complete: use the same conversion for C2, but return DATE(2026,3,1) when C2 is blank.

F2 elapsed calendar days: =IF(OR(D2="Review",E2="Review",D2=""),"Review",IF(E2<D2,"Review",E2-D2)). Format D:E as an unambiguous date such as yyyy-mm-dd and F as a number.

The formula accepts serial dates and exactly shaped ISO text. It deliberately flags 03/04/2026. INT removes time from serial values. Tests: same day → 0; 27 Feb to 1 Mar 2026 → 2; blank completion uses 1 Mar; 29 Feb 2024 parses correctly; completion before start → Review. Validate imported ISO strings with impossible months or days because DATE can roll invalid components forward.

Warum das funktioniert

  1. 1

    Normalization separates data conversion failures from duration logic.

  2. 2

    Refusing ambiguous locale formats prevents plausible but incorrect dates.

Ergebnis prüfen

  • Are ambiguous text dates flagged instead of guessed?

  • Is inclusivity defined for same-day and end-date cases?

  • Are negative durations visible as data errors?

Sicher nutzen

Häufig gestellte Fragen

Praktische Antworten dazu, wann du dieses Rezept verwenden solltest, was du bereitstellen solltest und wo menschliche Prüfung weiterhin wichtig ist.

What should I prepare before using “Clean Excel dates and calculate a duration”?

For “Clean Excel dates and calculate a duration,” prepare Observed date values, Columns and desired result, and Duration rules. Replace placeholders only with information you can verify. If a detail is unknown, preserve that uncertainty explicitly instead of asking the model to infer it.

When is the “Clean Excel dates and calculate a duration” result not ready to use?

The result is not ready if it does not yet deliver the stated outcome—A safe conversion and duration method with locale and boundary tests—from the supplied evidence, or if it relies on unresolved assumptions, missing approvals, or invented details. Use the checks as release gates: revise the source inputs or assign a named, authorized reviewer instead of polishing an unsupported output.

Which AI tools have recorded tests for “Clean Excel dates and calculate a duration”?

The published test record for “Clean Excel dates and calculate a duration” lists ChatGPT as of 2026-08-28. This confirms recorded runs, not guaranteed compatibility or identical results in later product versions. For another tool or version, keep every constraint visible and repeat the result checks before use.

Weitere Möglichkeiten zum Entdecken

Wo dieses Rezept hineinpasst

Bring die Arbeit voran