day() function

Extract the day from a date, or the number of days from a Interval

Syntax

day(date)
day(Interval)

Arguments

date - is date or datetime. The date to extract the day from.
Interval - is Interval. The Interval to return the number of days from.

Example

day('2012-05-12') → 12
day(tointerval('3 days')) → 3
day(age('2012-01-01','2010-01-01')) → 730