IntelliJ Java IDE
The moose likes Oracle/OAS and the fly likes what is the length of the Date? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » Oracle/OAS
Reply Bookmark "what is the length of the Date?" Watch "what is the length of the Date?" New topic
Author

what is the length of the Date?

Lipman Li
Ranch Hand

Joined: May 02, 2002
Posts: 122
hi,
I'm confused with the following query result, could anybody explain the reason, why vsize(sysdate) return 8, vsize(hiredate) return 7?
I know that vsize(expr) defined as "Returns the number of bytes in the internal representation of expr", but sysdate have one more byte than date type column defined in table.
select sysdate, vsize(sysdate) from dual;
sysdate vsize(sysdate)
22-AUG-02 8
select hiredate, vsize(hiredate) from emp;
sysdate vsize(sysdate)
22-AUG-02 7
[ August 22, 2002: Message edited by: Lipman Li ]
Lipman Li
Ranch Hand

Joined: May 02, 2002
Posts: 122
I know the reason already, sysdate is function, hiredate is a column.
cheers
 
IntelliJ Java IDE
 
subject: what is the length of the Date?
 
Threads others viewed
DATE and sysdate
sql query problem
Date format
compatibility of date format
sql syntax for system date
MyEclipse, The Clear Choice