Skip to content

Commit

Permalink
Update nrql-syntax-clauses-functions.mdx
Browse files Browse the repository at this point in the history
Style changes
  • Loading branch information
jeff-colucci committed Jan 18, 2024
1 parent ae61c5f commit 72a731f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2670,15 +2670,15 @@ Note: `aparse()` is case-insensitive.
* datestring - A datetime string to be translated into a timestamp (epoch milliseconds). This can be a string attribute or a string literal in quotes.
* pattern - An optional datetime pattern used to parse the datestring parameter. See the *Patterns for Formatting and Parsing* section in the [DatetimeFormatter documentation](https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html) for how to construct a pattern string.
* This must be a constant string value and will default to `yyyy-MM-dd'T'HH:mm:ss[.SSS][XXX]` if a pattern is not provided.
* This must be a constant string value and will default to `yyyy-MM-dd'T'HH:mm:ss[.SSS][XXX]` if a pattern isn't provided.
* timezone - An optional timezone value that is used to interpret the datestring parameter (ex. PST).
* This must be a constant string value and will default to UTC, or the value provided in `WITH TIMEZONE` if available.
Alias: `fromDatetime()` is an alternative name for the `toTimestamp()` function.
<Callout variant="tip">
If the string found does not match the given pattern, it will return `null`. If you happen to have datetime strings in a variety of patterns, you can coalesce results by leveraging `OR` to cascade until one of the values is non-null. You can also use optional pattern segments. The default pattern uses square brackets to make the milliseconds and zone-offset parts optional.
If the string found doesn't match the given pattern, it will return `null`. If you happen to have datetime strings in a variety of patterns, you can coalesce results by using `OR` to cascade until one of the values is non-null. You can also use optional pattern segments. The default pattern uses square brackets to make the milliseconds and zone-offset parts optional.
</Callout>
<CollapserGroup>
Expand Down

0 comments on commit 72a731f

Please sign in to comment.