Questions tagged [systimestamp]

SYSTIMESTAMP is an Oracle built-in function that returns the system date, including fractional seconds and time zone, of the system on which the database resides. The return type is TIMESTAMP WITH TIME ZONE.

21 questions
5
votes
1 answer

Meaning of Oracle's dump(systimestamp) bytes

I'm trying to understand what the bytes from the timestamp set on my DB mean. How do they get computed to generate the more readable date? I'm using the below query to get the data that I need: SELECT systimestamp ,DUMP (systimestamp) …
Radu Gheorghiu
  • 20,049
  • 16
  • 72
  • 107
4
votes
3 answers

How to port gethrtime() in C from Solaris to RHEL

I'm porting a C project from Solaris to Linux and recompiling it. In a logger.c, gethrtime() function of sys/time.h doesn't compile for Linux. How can I port it to Linux? Is there a substitute of this in Linux?
SwapnilShivhare
  • 105
  • 2
  • 5
3
votes
1 answer

How do I get system date and time in oracle sql?

I am using oracle apex when ever I try the code SELECT TO_CHAR (SYSTIMESTAMP) "NOW" FROM DUAL The result is always behind 5 hours. Can any one help me for this query?
sohaib sonu
  • 41
  • 1
  • 3
3
votes
1 answer

Is there any equivallent function in postgres like systimestamp() of oracle

I'm working on a oracle to postgresql database migration project. I need to read operating system date and time from postgres. In oracle sysdate() returns system date time in date type data and systimestamp() returns timestamp type data whatever the…
Amir Hossain
  • 173
  • 2
  • 14
1
vote
0 answers

SYS_EXTRACT_UTC (SYSTIMESTAMP) from oracle to postgres

how to convert SYS_EXTRACT_UTC (SYSTIMESTAMP) from oracle to postgres?
Groot
  • 21
  • 3
1
vote
2 answers

SCN to TimeStamp - wrong expression?

I have SCN: SELECT TIMESTAMP_TO_SCN(SYSTIMESTAMP) SCN FROM DUAL; I can convert it to time stamp: SELECT SCN_TO_TIMESTAMP(6480157) FROM DUAL; When I want to mix this two select Im getting error: SELECT SCN_TO_TIMESTAMP(SELECT…
4est
  • 3,010
  • 6
  • 41
  • 63
1
vote
2 answers

Atempt delete rows in oracle database older than 1 hour causing timeouts

I have strange problem that I can't fix. I'm trying to delete all rows that them timestamp is older than 1 hour. SQL : DELETE FROM TABLE WHERE TIMESTAMP <= SYSTIMESTAMP - 1/24 Whole code work perfect in SQL Developer but when i try do same in…
Aht
  • 583
  • 4
  • 25
1
vote
2 answers

Convert timestamp to date data type

SELECT to_date(to_char(SYSTIMESTAMP, 'MM/DD/YYYY'), 'MM/DD/YYYY') FROM DUAL; ==> 04-MAR-16 Can anybody explain why this select statement doesn't result in '03/04/2016'? How can I write my selection so that it does result in this, as a date type? I…
Brian Brock
  • 357
  • 2
  • 3
  • 18
1
vote
1 answer

Use PL/SQL to return a time period that systimestamp currently belongs to

i.e. I planned to divide 24 hours into 24 sections (1 hour for each section): 00:30:00 AM to 01:29:59 AM as 1st section and so on Current systimestamp = "02-NOV-15 06.13.49.000000000 PM" I want to get the SQLs that can return a time period from…
Martin.Z
  • 11
  • 1
1
vote
2 answers

Varchar2 datatype allows systimestamp

I have one table with varchar2 datatypes like below create table t11 (aa varchar2(100),bb varchar2(100)); Now, if I trying to insert systimestamp into above, values are getting inserted: insert into t11 values…
Ashish Patil
  • 4,428
  • 1
  • 15
  • 36
1
vote
1 answer

Alter Column from a date to accept systimestamp

At the current time I have a trigger that updates a date field with sysdate, unfortunately this can sometimes not be unique if an update occurs within the same second. Is it possible to alter a column to use systimestamp so that it using…
Tobias
  • 67
  • 1
  • 2
  • 6
0
votes
1 answer

Systimestamp In oracle

I am using below SQL statement. The below systimestamp displays the same seconds values for all the records. The table contains one million records. How can we displays the seconds or nano seconds variations for each records? OR any other methods to…
Ram
  • 727
  • 2
  • 16
  • 33
0
votes
0 answers

Oracle SYSTIMESTAMP returns wrong minutes

The following query returns me the wrong time in Oracle's SQL Developer tool, more specifically the minutes are a bit off. I added a screenshot to make the issue clearer. The time of execution was 2:12, but the query returned 2:05. If I remove the…
Hollow
  • 1
  • 1
0
votes
3 answers

Insert SYSTIMESTAMP for Timestamp field

I have three timestamps in my SQL Table. Column Name Data Type Nullable Data_Default STATUS_TIMSTM TIMESTAMP(6) No (null) CREATED_TIMSTM TIMESTAMP(6) No SYSTIMESTAMP UPDATED_TIMSTM TIMESTAMP(6) No (null) INSERT INTO…
overlord9314
  • 35
  • 1
  • 9
0
votes
1 answer

How do i get an age according to the current system time in NLS_DATE_FORMAT? (Oracle SQL)

I have a table called person, how do i get a person age according to the current system time in NLS_DATE_FORMAT? ALTER SESSION SET NLS_DATE_FORMAT = 'DD.MM.YYYY'; CREATE TABLE person ( person_id NUMBER (9), birthday DATE CONSTRAINT…
Andre Proenza
  • 149
  • 1
  • 10
1
2