I'm trying to convert the number 1477958757748.9697 to long in the mongo-shell. The NumberLong function throws an error:
> NumberLong(1477958757748.9697);
2017-06-03T08:52:56.306-0400 E QUERY [thread1] Error: number
passed to NumberLong must be representable as an int64_t :
@(shell):1:1
>
Is there an alternative to NumberLong? NumberInt for examle does work for integers:
> NumberInt(12.6);
NumberInt(12)
>
How can you do that in Mongo?