-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Functions makeDate, makeDateTime, YYYYMMDDToDate, changeYear and similar. #30895
Copy link
Copy link
Closed
Closed
Copy link
Labels
comp-datetimeDate/DateTime/TimeZone datatypes and date-time semantics.Date/DateTime/TimeZone datatypes and date-time semantics.featurewarmup taskThe task for new ClickHouse team members. Low risk, moderate complexity, no urgency.The task for new ClickHouse team members. Low risk, moderate complexity, no urgency.
Description
Describe solution you'd like:
makeDate(year, month, day)
makeDate32(year, month, day)
makeDateTime(year, month, day, hour, minute, second, [timezone])
makeDateTime64(year, month, day, hour, minute, second, [resolution], [fraction], [timezone])
YYYYMMDDToDate(num)
YYYYMMDDToDate32(num)
YYYYMMDDhhmmssToDateTime(num, [timezone])
YYYYMMDDhhmmssToDateTime64(num, [resolution], [timezone]) -- no fraction arg, it's implicitly extracted from floating point or decimal num.
-- returns the same data type as dt:
changeYear(dt, new_value)
changeMonth(dt, new_value)
changeDay(dt, new_value)
-- if argument is Date - returns DateTime, if Date32, returns DateTime64:
changeHour(dt, new_value)
changeMinute(dt, new_value)
changeSecond(dt, new_value)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
comp-datetimeDate/DateTime/TimeZone datatypes and date-time semantics.Date/DateTime/TimeZone datatypes and date-time semantics.featurewarmup taskThe task for new ClickHouse team members. Low risk, moderate complexity, no urgency.The task for new ClickHouse team members. Low risk, moderate complexity, no urgency.