1 00:00:02,170 --> 00:00:06,900 We convert quite a bit in our dataset and that is of course all right. 2 00:00:06,970 --> 00:00:13,420 However if you just need a simple conversion like this one, where you don't specify on error and on null, 3 00:00:14,290 --> 00:00:16,180 then you can also use a shortcut, 4 00:00:16,450 --> 00:00:20,240 there are some special operators in mongodb 5 00:00:20,770 --> 00:00:30,600 and of course you find them in the official docs under aggregation pipeline operators. There you find if 6 00:00:30,600 --> 00:00:37,270 you scroll down to T, to date, to decimal, to double, to int, to long and so on operators, 7 00:00:37,320 --> 00:00:41,540 so these are shortcuts if you need to do a specific transformation. 8 00:00:41,550 --> 00:00:50,130 So in my case here where I don't have on error and on null, I could just say to date here and simply pass 9 00:00:50,130 --> 00:00:54,140 in the field which holds the date value I want to transform, just like that 10 00:00:54,570 --> 00:00:57,790 and this will yield the same output as we had before. 11 00:00:57,960 --> 00:01:02,860 If I execute this, you see we still have an ISO date but now it's a bit shorter, 12 00:01:02,880 --> 00:01:06,330 so be aware of these shortcuts for simple transformations. 13 00:01:06,330 --> 00:01:13,320 If you do want to specify your own on error and on null fallback because you might have incomplete data 14 00:01:13,320 --> 00:01:17,120 in your dataset, then using these shortcuts is a bit more difficult, 15 00:01:17,130 --> 00:01:22,540 you at least have to check their docs to see if the default value is they will assume are all right 16 00:01:22,560 --> 00:01:23,150 for you.