DAY
From SQLZoo
DAY(d) | ||
---|---|---|
Engine | OK | Alternative |
ingres | No | EXTRACT(DAY from d) |
mysql | Yes | EXTRACT(DAY from d) |
oracle | No | TO_CHAR(d,'DD') |
postgres | No | EXTRACT(DAY from d) |
sqlserver | Yes | DATEPART(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: | English • Deutsch |
---|