Reader small image

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

Product typeBook
Published inMay 2023
PublisherPackt
ISBN-139781804611869
Edition1st Edition
Concepts
Right arrow
Author (1)
Michal Kvet
Michal Kvet
author image
Michal Kvet

Michal Kvet is a researcher, educator, and database expert at the University of Žilina in Slovakia. His primary focus areas are databases, analytics, performance, and cloud computing. He works closely with Oracle and Oracle Academy. He is the co-author of multiple textbooks (a SQL and PL/SQL cookbook, a book on APEX application development, a book on temporal databases, and a MySQL cookbook), coordinates multiple Erasmus+ projects and co-organizes several research conferences and database workshops. Besides this, he supervises engineering projects and bachelor's, master's, and doctoral theses. Over the years, his research has been associated with date and time management and temporal databases. He has Oracle's SQL, PL/SQL, Cloud, Analytics, and Administration certifications. His core knowledge of temporality is provided to you in this book.
Read more about Michal Kvet

Right arrow

TIMESTAMP and transformation across time zones

When dealing with higher-value precision, the TIMESTAMP data type is available to serve up to nanosecond precision. There are also two functions for getting the current date and time representation: systemtimestamp and current_timestamp. The systemtimestamp function is part of the STANDARD package owned by the SYS user. The full name (owner.package_name.function_name) does not need to be specified since the public synonym is already specified. Thus, just using the name in the direct reference is sufficient. It provides the time zone on the server (database) side. The following code shows the systimestamp function call:

select SYS.STANDARD.systimestamp from dual;
select systimestamp from dual;
--> 08.03.22 13:53:10,324000000 +00:00

The reference of the local timestamp of the session can be obtained by a current_timestamp function call, which is part of the STANDARD package owned by the SYS user as well:

select SYS.STANDARD.current_timestamp...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Developing Robust Date and Time Oriented Applications in Oracle Cloud
Published in: May 2023Publisher: PacktISBN-13: 9781804611869

Author (1)

author image
Michal Kvet

Michal Kvet is a researcher, educator, and database expert at the University of Žilina in Slovakia. His primary focus areas are databases, analytics, performance, and cloud computing. He works closely with Oracle and Oracle Academy. He is the co-author of multiple textbooks (a SQL and PL/SQL cookbook, a book on APEX application development, a book on temporal databases, and a MySQL cookbook), coordinates multiple Erasmus+ projects and co-organizes several research conferences and database workshops. Besides this, he supervises engineering projects and bachelor's, master's, and doctoral theses. Over the years, his research has been associated with date and time management and temporal databases. He has Oracle's SQL, PL/SQL, Cloud, Analytics, and Administration certifications. His core knowledge of temporality is provided to you in this book.
Read more about Michal Kvet