Download and install the date-time utilities code
Download the '.zip' file and install the reusable code that the 'date-time' major section describes and uses.
Each of these five sections describes reusable code that you might find useful:
- User-defined interval utility functions
- Modeling the internal representation and comparing the model with the actual implementation
- Custom domain types for specializing the native interval functionality
- The extended_timezone_names view
- Recommended practice for specifying the UTC offset
- Rules for resolving a string that's intended to identify a _UTC offset > Helper functions
Moreover, some of the code examples depend on some of this code. Yugabyte recommends therefore that you download and install the entire kit into the database that you use to support your study of the date-time data types. With this code installed, all the code examples on every page listed in the Table of contents will run without error provided only that, in the general case, you run them in the order in which a particular page presents them.
Download date-time-utilities.zip to any convenient directory and unzip it. It creates a small directory hierarchy.
You'll find README.pdf at the top level. It describes the rest of the content and tells you simply to start the master script 0.sql at the ysqlsh prompt (or at the psql prompt). You can run it time and again. It will always finish silently.