SECOND

From SQLZOO
Revision as of 16:24, 16 July 2012 by Connor (Talk | contribs)

Jump to: navigation, search
Compatibility
SECOND(d)
EngineOKAlternative
ingresYesEXTRACT(SECOND from d)
mysqlYesEXTRACT(SECOND from d)
oracleNoTO_CHAR(d,'HH24')
postgresNoEXTRACT(SECOND from d)
sqlserverYesDATEPART(SECOND,d)

SECOND

SECOND allows you to retrieve the second from a date.

   SECOND(d)

In this example you get the second from the date field whn.

SELECT EXTRACT(SECOND FROM whn) AS v
      ,whn
      ,wht
  FROM eclipse
SELECT TO_CHAR(whn,'SECOND') AS v
      ,whn
      ,wht
  FROM gisq.eclipse
SELECT SECOND(whn) AS v, whn, wht
  FROM eclipse

See also

Personal tools
Namespaces

Variants
Actions
Reference
Toolbox
Google AdSense