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: SQL Q: how to select current time?

Re: SQL Q: how to select current time?

From: <amtran2_at_my-dejanews.com>
Date: 1998/08/28
Message-ID: <6s6q1d$sve$1@nnrp1.dejanews.com>#1/1

specific syntax would be
SELECT TO_CHAR(SYSDATE,'MM/DD/YYYY HH:MM:SSSS AM') FROM DUAL; substitute the date mask with any combination below CC or SCC - century
SYYY,YYYY,YEAR,SYEAR,YYY,YY, or Y for Year Q for Quarter
MONTH,MON,MM, or RM for month
DDD,DD or J for Day
HH,HH12,HH24 for hour
MI for Minute
SS for Second (depends on the precision of second, specify the number of S's)

In article <01bdd117$38f25320$8de1edc1_at_dpc-c>,   "Dave Cooper" <dave_at_dpc-c.demon.co.uk> wrote:
> Look at formatting date type columns in your SQL guide. The sysdate does
> have the time embedded in it but by default is not displayed. You need to
> apply a format mask to sysdate to extract the date and time.
>
> m_van_basten_at_hotmail.com wrote in article
> <6rshag$khf$1_at_nnrp1.dejanews.com>...
> > Selecting SysDate from dual only gives the date. So how to select
 current
> > time? And how to select date and time together?
> >
> > Thanks!
> >
> > -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> > http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
> >
>

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Fri Aug 28 1998 - 00:00:00 CDT

Original text of this message

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