[SERVER-32842] Timestamp support for $convert Created: 22/Jan/18 Updated: 30/Oct/23 Resolved: 19/Oct/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.2.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Justin Seyster | Assignee: | Drew Paroski |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | query-44-grooming | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
Support conversions between date and timestamp, as well as conversions from timestamp to any type that a date can be converted to. |
| Comments |
| Comment by Asya Kamsky [ 10/Mar/22 ] | ||
|
For those on older version, there's a workaround for this:
| ||
| Comment by Githook User [ 18/Oct/21 ] | ||
|
Author: {'name': 'Bobby Morck', 'email': 'bobby.morck@mongodb.com', 'username': 'bmorck'}Message: | ||
| Comment by Katya Kamenieva [ 05/Mar/21 ] | ||
|
Though it would be uncommon for users to store their data as Timestamp, it is present in change streams events, so this feature would be useful. | ||
| Comment by Asya Kamsky [ 12/Sep/19 ] | ||
|
Which should also apply to {$toDate:<Timestamp>} | ||
| Comment by Asya Kamsky [ 22/Jan/18 ] | ||
|
I think just supporting {$convert:{input:Timestamp,to:”date”}} is sufficient. |