diff --git a/guides/databases.md b/guides/databases.md index 698000bb1..6348de4ef 100644 --- a/guides/databases.md +++ b/guides/databases.md @@ -375,12 +375,14 @@ This set of functions are by large the same as specified in OData: * `floor(x)` — rounds the input numeric parameter down to the nearest numeric value * `round(x)` — rounds the input numeric parameter to the nearest numeric value. The mid-point between two integers is rounded away from zero, i.e. 0.5 is rounded to 1 and ‑0.5 is rounded to -1. -* `year(x)` `month(x)`, `day(x)`, `hour(x)`, `minute(x)`, `second(x)`, `fractionalseconds(x)`, `time(x)`, `date(x)` — +* `year(x)` `month(x)`, `day(x)`, `hour(x)`, `minute(x)`, `second(x)` — returns parts of a datetime for a given `cds.DateTime` / `cds.Date` / `cds.Time` +* `time(x)`, `date(x)` - returns a string representing the `time` / `date` for a given `cds.DateTime` / `cds.Date` / `cds.Time` +* `fractionalseconds(x)` - returns a a `Decimal` representing the fractions of a second for a given `cds.Timestamp` * `maxdatetime(x)`, `mindatetime(x)` — return the maximum or minimum datetime for a given `cds.DateTime` / `cds.Date` / `cds.Time` -* `totalseconds(x)` — returns the total seconds of a datetime for a given `cds.DateTime` / `cds.Time` +* `totalseconds(x)` — returns the duration of the value in total seconds, including fractional seconds. The [OData spec](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html#sec_totalseconds) defines the input as EDM.Duration: `P12DT23H59M59.999999999999S` * `now()` — returns the current datetime -* `min(x)` `max(x)` `sum(x)` `avg(x)` `count(x)`, `countdistinct(x)` — aggregate functions +* `min(x)` `max(x)` `sum(x)` `average(x)` `count(x)`, `countdistinct(x)` — aggregate functions * `search(xs,y)` — checks whether `y` is contained in any of `xs`, may be fuzzy → [see Searching Data](../guides/providing-services#searching-data) * `session_context(v)` — with standard variable names → [see Session Variables](#session-variables) > 1 These functions work zero-based. E.g., `substring('abcdef', 1, 3)` returns 'bcd'