datetime-handling

Convert and validate SDTM date fields to ISO 8601 character text.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/siddharthchauhan/ETL --skill datetime-handling
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: datetime-handling
Source: https://github.com/siddharthchauhan/ETL/tree/main/sdtm_pipeline/deepagents/skills/datetime-handling
Command: npx skills add https://github.com/siddharthchauhan/ETL --skill datetime-handling

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

SDTM date variables must be ISO 8601 and stored as character strings. This skill provides robust date parsing, conversion, and handling for complete and partial dates, along with study day calculations and duration formatting to ensure SDTM compliance.

Core Features & Use Cases

  • Convert diverse date formats to ISO 8601 (YYYY-MM-DD) and preserve character type for all DTC variables.
  • Handle partial dates (year only, year-month) with clear imputation strategies and study-day calculations (--DY).
  • Compute SDTM durations using ISO 8601 formats and generate necessary ADaM documentation notes for imputation.

Quick Start

Example: Convert a sample birth date "1985-07-20" to BRTHDTC, compute the corresponding study day against RFSTDTC, and output an ISO 8601 duration for a 7-day window.

Frequently Asked Questions about datetime-handling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert SDTM date fields to ISO 8601 format?

To convert SDTM date fields to ISO 8601, parse diverse date inputs and reformat them as YYYY-MM-DD character strings. This ensures SDTM compliance for birth dates, event times, and assessments while preserving the required character variable type.

How do I handle partial dates and imputation for SDTM compliance?

Handling partial dates for SDTM involves applying clear imputation strategies for year-only or year-month inputs. The process formats incomplete dates into ISO 8601 character text and generates necessary ADaM documentation notes detailing the imputation rules applied.

Can I calculate study day (--DY) using ISO 8601 dates in SAS, R, and Python?

Yes, you can calculate study day (--DY) using ISO 8601 dates across SAS, R, and Python. The implementation supports multi-language environments to compute study days against the reference start date (RFSTDTC) for various SDTM domains.

What is the best way to format SDTM durations using ISO 8601?

The best way to format SDTM durations is to compute intervals using standardized ISO 8601 formats. This approach calculates duration windows accurately and outputs compliant character strings suitable for clinical data submissions.

Do SDTM DTC variables need to be stored as character text after date conversion?

Yes, SDTM DTC variables must be stored as character text after date conversion. Converting dates to ISO 8601 format (YYYY-MM-DD) ensures compliance while maintaining the character data type required for all SDTM date and time variables.