Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: DATEWIDTH in Personal Oracle 7.3

Re: DATEWIDTH in Personal Oracle 7.3

From: Jerry Gitomer <jgitomer_at_ictgroup.com>
Date: Wed, 26 Aug 1998 19:23:37 -0400
Message-ID: <6s25ap$ga9$1@client3.news.psi.net>


Hi GP,

    Like Jonathon I am confused. Oracle stores dates in a seven-byte internal format with one byte each for century, year, month, day, hour, minute, and second. You can use the TO_CHAR function to format the presentation of the date. Now if your output is restricted to 9 columns you cannot extract the full date and time since the minimum space required, even assuming a 2 digit year and no century is 12 characters, that is, 'YYMMDDHHMISS' for time to the nearest second.

regards

Jerry

GP wrote in message <35E3D37D.4FD4_at_virgin.net>...
>Jonathan Gennick wrote:
>>
>> On Sun, 23 Aug 1998 19:43:54 +0100, GP
>> <g.pendleton_at_virgin.net> wrote:
>>
>> I'm not sure I understand the issue here. Are you referring
>> to the physical width of the date field in the database
>> filess? You can't control that. Do you just want to see a
>> four digit year when you select a date? That's a bit easier.
>> One way is to use TO_CHAR:
>>
>> select to_char(date_field,'mm/dd/yyyy') from your_table;
>>
>> Did I understand your question correctly?
>>
>> Jonathan Gennick
>
>
>Thanks for your help but maybe I'm going about this the wrong way. I
>want to insert/query full date and time into a date field but I only
>have room for 9 characters. I cannot seem to change this. Is the above
>reply still applicable?
>
>Thanks George
Received on Wed Aug 26 1998 - 18:23:37 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US