Hello, @Rajesh_Yadav!
If I understood you correctly, you want to have property ‘d’ in the document, that would contain integer representation of date or null, if date is not provided?
If so, consider this mongo shell example:
With the above validator, you will be able to insert either int or null as a value for property ‘d’. Property ‘d’ is required (must always be present in any inserted document).