asDateTime

fun asDateTime(): BsonDateTime

Gets this value as a BsonDateTime if it is one, otherwise throws exception

Return

an BsonDateTime

Throws

if this value is not of the expected type