I’m looking for a way to get the age of a person given it’s date of birth in CosmosDB.
I’ve read on the docs that they’ve recently implemented “computed properties” at container level on this form:
{
"computedProperties": [
{
"name": "cp_Age",
"query": "SELECT VALUE DateTimeDiff('YYYY', c.DateOfBirth, GetCurrentDateTime()) FROM c"
}
]
}
but I have no luck making it work, and I don’t find much documentation regarding this.
Anybody out there has implemented something similar so far?
Thanks in advance