DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: size of date datatype

  1. #1
    Join Date
    Oct 2001
    Location
    India
    Posts
    10

    Smile

    Can any one please clear my doubt. What is the size of a date data type in Oracle?
    Thanks and regards
    iyappan

  2. #2
    Join Date
    Sep 2000
    Location
    Sao Paulo,SP,Brazil, Earth, Milky Way
    Posts
    350
    Internally Oracle databases stores the DATE datatype in seven bytes.One byte for each of the century, year, month, day, hour, minute and second. You will find this documented in the Server Administrator's Guide, IIRC

    []s

    Chiappa

  3. #3
    Join Date
    Oct 2001
    Posts
    83
    Hello,

    You can use the "vsize" fonction to have the number of bytes in the internal representation of your field.

    try this : select vsize(sysdate) from dual;

    Hope this helps

  4. #4
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Originally posted by noor
    Hello,

    You can use the "vsize" fonction to have the number of bytes in the internal representation of your field.

    try this : select vsize(sysdate) from dual;
    Which will return you 8 instead of 7 (Oracle uses 7 bytes for storing dates)! We have just recently had two long threads about this isue in DBA forum...
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width