domingo, 16 de fevereiro de 2014

Saving DateTime properly with PlayFramework and ReactiveMongo

Today I was playing with PlayFramework and ReactiveMongo, when I saw that Play was parsing my DateTime object as a number:


But what I really wanted was parse as a Date not as a number, so I could build mongo queries and use functions like $month or $year in mongodb. So I created a Format :

Now if I save a DateTime Object, querying the mongodb I can see the date format properly.

Nenhum comentário:

Postar um comentário