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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Anyone know of a clear explanation of date types in Oracle?

Re: Anyone know of a clear explanation of date types in Oracle?

From: Markus Stuhlpfarrer <mstuhlpfarrer_at_hollomey.com>
Date: Thu, 23 Aug 2001 12:18:36 GMT
Message-ID: <3B84F46B.B2E6995D@hollomey.com>


to_char converts date and number fields to varchar after certain criteria
to_char(sysdate,'YYYY-MM-DD HH24:MI:SS') gives you a date like this '2001-08-23 14:14:47'
the 'YYYY-MM-DD HH24:MI:SS' is the format string for this you have many possibilities to convert a date into many different forms
and you can convert numbers into strings like this (e.g.: that you have the number with leading zeroes or the number 1000 as '1.000')

with 'alter session nls date' you can change the standard date format output in a select (when you don't use to_char with the date value)

sysdate gives you the system time and date on the database "select sysdate from dual" returns the date in the format specified by the NLS Date

Chris Newman wrote:

> I am newbie and need to understand need to use
>
> TOCHAR () function
> ALTER SESSION NLS DATE
> SYSDATE
>
> Hope this question is not too cryptic
Received on Thu Aug 23 2001 - 07:18:36 CDT

Original text of this message

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