Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Developing Robust Date and Time Oriented Applications in Oracle Cloud

You're reading from  Developing Robust Date and Time Oriented Applications in Oracle Cloud

Product type Book
Published in May 2023
Publisher Packt
ISBN-13 9781804611869
Pages 464 pages
Edition 1st Edition
Languages
Concepts
Author (1):
Michal Kvet Michal Kvet
Profile icon Michal Kvet

Table of Contents (26) Chapters

Preface Part 1: Discovering Oracle Cloud
Chapter 1: Oracle Cloud Fundamentals Chapter 2: Data Loading and Migration Perspectives Part 2: Understanding the Roots of Date and Time
Chapter 3: Date and Time Standardization Principles Chapter 4: Concepts of Temporality Part 3: Modeling, Storing, and Managing Date and Time
Chapter 5: Modeling and Storage Principles Chapter 6: Conversion Functions and Element Extraction Chapter 7: Date and Time Management Functions Chapter 8: Delving into National Language Support Parameters Part 4: Modeling Validity Intervals
Chapter 9: Duration Modeling and Calculations Chapter 10: Interval Representation and Type Relationships Chapter 11: Temporal Database Concepts Chapter 12: Building Month Calendars Using SQL and PL/SQL Part 5: Building Robust and Secure Temporal Solutions
Chapter 13: Flashback Management for Reconstructing the Database Image Chapter 14: Building Reliable Solutions to Avoid SQL Injection Part 6: Expanding a Business Worldwide Using Oracle Cloud
Chapter 15: Timestamp Enhancements Chapter 16: Oracle Cloud Time Zone Reflection Assessments Index Other Books You May Enjoy

Getting to know the ADD_MONTHS function

Mathematical arithmetical operations that are done on the DATE value express the day granularity. Thus, adding a value of 1 to the DATE value results in tomorrow being reflected while the original time values remain the same.

The ADD_MONTHS function has two parameters – the date value (date_val) and the number of months (number_months) to be added or subtracted. The result is the input date with processed months. Such functionality can also be done explicitly by parsing the DATE attribute. However, the transition between years and months must be handled explicitly.

The syntax of the ADD_MONTHS function is stated in the following line:

ADD_MONTHS(<date_val>, <number_months>)

The following code snippet highlights its usage. The shift of the month, denoted by the second parameter of the ADD_MONTH function, can be positive as well as negative, expressing adding or subtracting months. The first statement adds 7 months...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}