Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Developing Robust Date and Time Oriented Applications in Oracle Cloud

You're reading from   Developing Robust Date and Time Oriented Applications in Oracle Cloud A comprehensive guide to efficient date and time management in Oracle Cloud

Arrow left icon
Product type Paperback
Published in May 2023
Publisher Packt
ISBN-13 9781804611869
Length 464 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Author (1):
Arrow left icon
Michal Kvet Michal Kvet
Author Profile Icon Michal Kvet
Michal Kvet
Arrow right icon
View More author details
Toc

Table of Contents (26) Chapters Close

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

Exploring the NEXT_DAY and NEXT_DATE functions

It often happens that you need to find the next free day in your calendar, the date of the next Wednesday, or the date of the second Sunday of the month when system updates are to be performed. In this section, we will take a closer look at two functions. The first of them is directly available within the database system. It refers to the NEXT_DAY function. However, as we will show, its evaluation and processing depend on several factors, specifically NLS parameters. Therefore, in the second part, we will propose an own function implementation that is resistant to changes in terms of the format and local parameters.

Exploring the principles of the NEXT_DAY function

The output of the NEXT_DAY function is the first weekday greater than the defined input date (date_val):

NEXT_DAY(<date_val>, <weekday>)

The following table shows the mapping principles.

Weekday

...
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 $19.99/month. Cancel anytime
Banner background image