-
Retrieve the date in a particular format in oracle
Hi,
I would like to retrieve the date in a particular format in oracle.
eg:
This is the format 17040892 (HH24:MI:SS:nn).
Is there any way we can get this from ORACLE.
I used the format HH24:MI:SS:SSSS which does not solve my problem. I want the date to be very precise.
Regards
Vijai
Last edited by vijai; 06-20-2003 at 01:35 AM.
-
Dear,
I believe that from version 9 on, you can use the TIMESTAMP data type.
1. Use TIMESTAMP to store very precise time values.
2. Use function SYSTIMESTAMP to return the current timestamp with up to 9 digits in the fractional second portion
3. Use function TO_TIMESTAMP to convert a character value to a timestamp
4. Use function TO_CHAR to do things the other way around, obviously.
Example :
SELECT TO_CHAR(SYSTIMESTAMP, 'SS.FF3') from dual;
I guess the precision you can get depends on the underlying operating system. I did a quick test on Windows and Linux, and I cannot more than 6 digits of precision.
Best regards.
CVM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|