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: SQL Problems

Re: SQL Problems

From: Sriram Chatrathi <sriram_at_beasys.com>
Date: Wed, 07 Apr 1999 08:33:42 -0700
Message-ID: <370B7AD6.83E38B93@beasys.com>


Sysdate actually contains the current system date and time. Depending on your formatting you will see different values. However it is easy to adjust using the to_char function to convert the sysdate :

For example :
SQL> col sys_date format a24
SQL> select to_char(sysdate, 'dd-mon-yyyy hh12:mi:ss AM') sys_date from dual;

SYS_DATE



07-apr-1999 08:32:34 AM

The formatting can be changed to anything you want. Refer to any SQL*Plus book for all available options.

Hope this helps...

-Sriram

Francis wrote:
>
> How about system time?
>
> On Tue, 06 Apr 1999 16:15:36 GMT, "Jens Schauder"
> <Jens.Schauder_at_opal-edv.com> wrote:
>
> >try something like
> >
> >select *
> >from some_table
> >where some_date = sysdate
> >
> >if you just want to test for the correct day
> >have a look on the function trunc, round and to_char
> >operating on dates
> >
> >cu
> >Jens
> >
> >Francis <francis_at_mail.com> wrote in article
> ><370c22d8.48611579_at_bbinews.netvigator.com>...
> >> How to compare the field with the system time using SQL*Plus?
> >>
Received on Wed Apr 07 1999 - 10:33:42 CDT

Original text of this message

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