Harrissou Sant-anna 1444ce3a34 Fix to_date* functions links to qt doc
QDateTime::fromString documentation no longer lists all the expressions
to construct the format, so we point to each component doc
2021-01-09 07:07:12 +10:00

17 lines
955 B
Plaintext

{
"name": "to_date",
"type": "function",
"groups": ["Conversions", "Date and Time"],
"description": "Converts a string into a date object. An optional format string can be provided to parse the string; see <a href='https://doc.qt.io/qt-5/qdate.html#fromString-2'>QDate::fromString</a> for additional documentation on the format.",
"arguments": [
{"arg":"string","description":"string representing a date value"},
{"arg":"format","optional":true,"description":"format used to convert the string into a date"},
{"arg":"language","optional":true,"description":"language (lowercase, two- or three-letter, ISO 639 language code) used to convert the string into a date"}
],
"examples": [
{ "expression":"to_date('2012-05-04')", "returns":"2012-05-04"},
{ "expression":"to_date('June 29, 2019','MMMM d, yyyy')", "returns":"2019-06-29"},
{ "expression":"to_date('29 juin, 2019','d MMMM, yyyy','fr')", "returns":"2019-06-29"}
]
}