20 lines
934 B
Plaintext
Raw Normal View History

{
"name": "day",
"type": "function",
2020-07-02 01:46:48 +01:00
"groups": ["Date and Time"],
"description": "Extracts the day from a date, or the number of days from an interval.",
"variants": [
{ "variant": "Date variant",
"variant_description": "Extracts the day from a date or datetime.",
"arguments": [ {"arg":"date","description":"a date or datetime value"}],
"examples": [ { "expression":"day('2012-05-12')", "returns":"12"}] },
{
"variant": "Interval variant",
"variant_description": "Calculates the length in days of an interval.",
"arguments": [ {"arg":"interval","description":"interval value to return number of days from"}],
"examples": [ { "expression":"day(to_interval('3 days'))", "returns":"3"},
{ "expression":"day(to_interval('3 weeks 2 days'))", "returns":"23"},
{ "expression":"day(age('2012-01-01','2010-01-01'))", "returns":"730"}]
}]
}