Getting date time stamp difference minutes in Oracle Database 12c Enterprise Edition

en Peris

I have this query to get the date time stamp difference minutes in Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production

SELECT TO_CHAR(GPS_FULL_DATE+2/24, 'MM-DD-YYYY HH24:MI:SS') GPS_DATE, 
       TO_CHAR(CREATION_DATE, 'MM-DD-YYYY HH24:MI:SS') CREATION_DATE,
       extract(minute from ((GPS_FULL_DATE+2/24)-CREATION_DATE)) mins
FROM server_data sd

But I got this error:

ORA-30076: invalid extract field for extract source
30076. 00000 -  "invalid extract field for extract source"
*Cause:    The extract source does not contain the specified extract field.
*Action:
Error at Line: 2 Column: 42
Littlefoot
(GPS_FULL_DATE + 2/24) - CREATION_DATE

returns number of days between two dates. Therefore, you can't extract number of minutes of it - you could, though, multiply the result by 24 * 60 (hours in a day * minutes in an hour) to get the desired value.

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

Oracle date & Time difference

分類Dev

Getting epoch time from gmt time stamp

分類Dev

How to derive max date on LISTAGG Oracle 12c

分類Dev

ハウツー:Grails 3.0.2 + Oracle Database 12c?

分類Dev

Downloading Oracle database 12c Release 1 (12.1.0.2.0) on Linux via wget

分類Dev

How to connect to Azure Oracle 12c Database using sqlplus or sql developer cloud connection

分類Dev

Oracle Database 12c - SYS パスワードの変更

分類Dev

How to work with a Javascript +Date() numeric time stamp in Python?

分類Dev

how to get time difference in minutes in pandas

分類Dev

Netezza get records last updated in last 5 minutes using a last modified time stamp column in the table?

分類Dev

Adding hours and minutes to a date object for time axis

分類Dev

Oracle Database 12c EnterpriseEditionリリース12.1.0.1.0をインポートします

分類Dev

Oracle 12cの設定?

分類Dev

Unix Time stamp creation in C from custom data fields

分類Dev

pull access denied for container-registry.oracle.com/database/enterprise

分類Dev

pull access denied for container-registry.oracle.com/database/enterprise

分類Dev

how do i convert unix time stamp to formatted date while using json_extract_scalar in bigquery

分類Dev

Code for automatically entering date/time stamp into cell based upon table heading

分類Dev

cx_oracle 6 for Oracle 12C version error

分類Dev

Oracle Database12c接続

分類Dev

Oracle 12c:trunc(date)のバグにより、誤ったデータが生成される

分類Dev

Oracle Database 12c EnterpriseEditionでの日付とタイムスタンプの差の分数の取得

分類Dev

Oracle Database 12cをインストールするにはどうすればよいですか?

分類Dev

Go: error getting difference between two time

分類Dev

Can the time stamp of a Retweet be accessed?

分類Dev

Compare between date time now and date time add minutes then overwrite the text file

分類Dev

Momentjs timezone - getting date at time in specific timezone

分類Dev

Getting date/time from DatePicker in swift

分類Dev

Getting Epochal Time from Date String

Related 関連記事

  1. 1

    Oracle date & Time difference

  2. 2

    Getting epoch time from gmt time stamp

  3. 3

    How to derive max date on LISTAGG Oracle 12c

  4. 4

    ハウツー:Grails 3.0.2 + Oracle Database 12c?

  5. 5

    Downloading Oracle database 12c Release 1 (12.1.0.2.0) on Linux via wget

  6. 6

    How to connect to Azure Oracle 12c Database using sqlplus or sql developer cloud connection

  7. 7

    Oracle Database 12c - SYS パスワードの変更

  8. 8

    How to work with a Javascript +Date() numeric time stamp in Python?

  9. 9

    how to get time difference in minutes in pandas

  10. 10

    Netezza get records last updated in last 5 minutes using a last modified time stamp column in the table?

  11. 11

    Adding hours and minutes to a date object for time axis

  12. 12

    Oracle Database 12c EnterpriseEditionリリース12.1.0.1.0をインポートします

  13. 13

    Oracle 12cの設定?

  14. 14

    Unix Time stamp creation in C from custom data fields

  15. 15

    pull access denied for container-registry.oracle.com/database/enterprise

  16. 16

    pull access denied for container-registry.oracle.com/database/enterprise

  17. 17

    how do i convert unix time stamp to formatted date while using json_extract_scalar in bigquery

  18. 18

    Code for automatically entering date/time stamp into cell based upon table heading

  19. 19

    cx_oracle 6 for Oracle 12C version error

  20. 20

    Oracle Database12c接続

  21. 21

    Oracle 12c:trunc(date)のバグにより、誤ったデータが生成される

  22. 22

    Oracle Database 12c EnterpriseEditionでの日付とタイムスタンプの差の分数の取得

  23. 23

    Oracle Database 12cをインストールするにはどうすればよいですか?

  24. 24

    Go: error getting difference between two time

  25. 25

    Can the time stamp of a Retweet be accessed?

  26. 26

    Compare between date time now and date time add minutes then overwrite the text file

  27. 27

    Momentjs timezone - getting date at time in specific timezone

  28. 28

    Getting date/time from DatePicker in swift

  29. 29

    Getting Epochal Time from Date String

ホットタグ

アーカイブ