Repository navigation
update time function docs for the timestamp type - #7714
Merged
Merged
Conversation
#7510 renamed the time type to timestamp. Update the Time function pages and the Date/Times type page to match, along with mentions of the type on other pages. Also correct the strftime directive table, document the SQL EXTRACT form of date_part, and add bucket examples.
mccanne
approved these changes
Nov 24, 2026
This was referenced Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the first of a few PRs from a pass over the function docs, checking each page against what
superdoes on currentmain. It covers the Time functions plus thetimestamptype page.timetype totimestamp, but the Time function pages and the Date/Times type page still saidtime. They now saytimestamp, and so do the one-word mentions of the type in thesort,infer,search, comparisons, statements, andsuper dbpages and the jq tutorial (whose examples already showedtimestamp). The type page also no longer callstimestampunsigned or saysINTERVALis an alias forduration(it's a reserved type now, as aredateandtime), and it says what SQLDATEliterals and casts produce today.strftime: corrected the directive table (%Dis zero-padded,%Iand%lrun from 1 to 12,%Vis the ISO 8601 week, and%c/%x/%Xdon't depend on a locale), added the missing%h, and noted that output is always UTC, that%c/%x/%Xuse fixed formats, and that there's no fractional-seconds directive.date_part: documented the SQLEXTRACT(part FROM ts)form, which compiles todate_part.bucket: explained where bucket boundaries fall (counted from the Unix epoch, so7dbuckets start on Thursdays) and what a zero span does, and added examples of counting by hour, weekly buckets, and bucketing durations.now: updated theswitchsketch to the current syntax and refreshed the sample output.