Open driedger opened 6 months ago
The timestamp format uses the Golang format specification, and is linked in the tooltip, but here is the same link for reference: https://pkg.go.dev/time#pkg-constants .
have you tried {"$project": {"date": {"$toDate": "$your_date_field"}}}
Hello, I have a large amount of legacy data in mongodb, where the original author chose to store some timestamps as a shortened integer value instead of a native Date datatype. All the values stored are a javascript timestamp, divided by 60,000 so it only represents minutes.
I for the life of me cannot figure out how to use the timestamp format field in the query editor to convert my custom timestamp into a BSON Date. I tried doing the conversion in my projection query, but that also does not return any results.
Could we provide an example of the timestamp formatting options? I attempted to refer to the Go time parse documentation in the tooltip, but cant seem to make it work.
Thanks