$second
The$second operator extracts the second component from a date object (0-59).
Input
- A single date object
Output
- The second component of the date as an integer (0-59)
Examples
Extract Second from Date
45
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
$second operator extracts the second component from a date object (0-59).
{
"$second": [
{
"$toDate": ["2023-01-15T10:30:45Z"]
}
]
}
45
{
"$second": [
{
"$input": "event_date"
}
]
}
