DAY

From SQLZoo
Compatibility
DAY(d)
EngineOKAlternative
ingresNoEXTRACT(DAY from d)
mysqlYesEXTRACT(DAY from d)
oracleNoTO_CHAR(d,'DD')
postgresNoEXTRACT(DAY from d)
sqlserverYesDATEPART(DAY,d)

DAY

DAY allows you to retrieve the day from a date.

   DAY(d)

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

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

See also

Language:Project:Language policy English  • Deutsch
DataWars, Data Science Practice Projects - LogoDataWars: Practice Data Science/Analysis with +100 Real Life Projects
  • Your server today is: Laa-Laa