"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.formatEvalQueryDateTime = formatEvalQueryDateTime;
const date_fns_1 = require("date-fns");
/** Parse API date strings for ClickHouse WHERE clauses. */
function formatEvalQueryDateTime(value) {
    if (value === undefined || value === null || value === '') {
        return undefined;
    }
    const d = value instanceof Date ? value : new Date(value);
    if (Number.isNaN(d.getTime())) {
        return undefined;
    }
    return (0, date_fns_1.format)(d, 'yyyy-MM-dd HH:mm:ss');
}
//# sourceMappingURL=formatEvalQueryDate.js.map