# Create mongodb database using another mongodb in node red

**URL:** https://discourse.nodered.org/t/create-mongodb-database-using-another-mongodb-in-node-red/50964
**Category:** General
**Created:** [13 September 2021 13:34 UTC](https://discourse.nodered.org/t/create-mongodb-database-using-another-mongodb-in-node-red/50964 "2021-09-13T13:34:47Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![abhilash](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@abhilash](https://discourse.nodered.org/u/abhilash)
#### Post date: [14 September 2021 06:51 UTC](https://discourse.nodered.org/t/create-mongodb-database-using-another-mongodb-in-node-red/50964/3 "2021-09-14T06:51:02Z")

</div>

Thanks UnborN for your reply,  
I dont think aggregation will work in my case. I will explain more detail about my requirement.  
I have thousands of mongoDB documents in a collection. These documents are creating each minute/hour/seconds with creation time stamp. I would like to create a new database in mongoDB with the fields like start time stamp, end time stamp, month, year for each month.

Challenge number one is, how do i find the start time stamp & end time stamp in a month from the thousands of documents.  
Challenge number two is i need to find the start time stamp and end time stamp for each month like January, February, etc.  
Then insert the fields to new mongoDB database.

thanks in advance

---

_[View the full topic](https://discourse.nodered.org/t/create-mongodb-database-using-another-mongodb-in-node-red/50964)._
