Courseiva
Data Analysis →easyMultiple Choice

DA0-002 Data Analysis Practice Question

During ETL, a data analyst discovers that a date column contains values like '01/02/2023' and '2023-01-02'. Which of the following is the best practice to ensure consistent date format before analysis?

⚠ Common exam trap

Watch out — candidates often choose Option B (regular expressions) thinking it offers fine-grained control, but they overlook that dedicated date parsing functions are more reliable, simpler, and handle edge cases like leap years or time zones that regex cannot easily manage.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Apply a standardized date parsing function to convert all dates

Applying a standardized date parsing function (e.g., `TO_DATE` in SQL or `pd.to_datetime` in Python) ensures all date values are converted to a single, consistent format regardless of the original representation. This is a fundamental ETL best practice to avoid ambiguity and enable accurate date-based filtering, aggregation, and joins during analysis.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Keep both formats and handle during analysis

    Why it's wrong here

    Retaining mixed formats defers the problem, so comparisons, sorting and joins stay ambiguous and locale-dependent. Standardising to ISO 8601 during ETL is the practice; keeping both formats is only defensible when source fidelity must be preserved for later reprocessing.

  • ✗

    Use regular expressions to parse and convert each format

    Why it's wrong here

    Regex parsing works but is brittle: it cannot resolve ambiguity such as whether 01/02 means 2 January or 1 February, and it ignores locale. A date-parsing function with an explicit format or locale handles this reliably, which is the expected best practice.

  • ✗

    Remove records with inconsistent date formats

    Why it's wrong here

    Dropping rows with inconsistent formats deletes valid data and biases results, especially if the format correlates with source system. Cleaning and converting the column preserves records; deletion is reserved for genuinely unparseable or corrupt values.

  • ✓

    Apply a standardized date parsing function to convert all dates

    Why this is correct

    A standardised parsing function explicitly interprets each source pattern, then emits one canonical representation, satisfying the consistency constraint. Unlike locale-dependent casting, it resolves ambiguity between day-first and ISO 8601 input deterministically, so '01/02/2023' and '2023-01-02' become comparable values before analysis.

About these practice questions

This DA0-002 question is part of Courseiva's 1,004-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This DA0-002 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DA0-002 exam.