Python
#4

Parse and Format Datetimes with Python datetime Module

Easy
Interview Question #4

Given two date strings '2026-01-15T09:30:00Z' and '2026-02-10T18:00:00Z', parse them using Python's standard `datetime` module and calculate the full calendar days elapsed between them.

Input Table: date_strings
1 rows preview
start_strend_str
2026-01-15T09:30:00Z2026-02-10T18:00:00Z
Expected Output Structure1 rows
elapsed_days
26
Interview Context

Asked frequently in data analyst and business analyst technical rounds. Focus on clean filtering, optimal indexing usage, and unambiguous column selection.

Python 3.10 (Pandas)
Environment Ready

Click "Run & Test" to execute your Pandas code against the test assertions.

Chat with us