Member since 
    
	
		
		
		06-17-2021
	
	
	
	
	
	
	
	
	
	
	
	
	
	
			
      
                3
            
            
                Posts
            
        
                0
            
            
                Kudos Received
            
        
                1
            
            
                Solution
            
        My Accepted Solutions
| Title | Views | Posted | 
|---|---|---|
| 848 | 06-17-2021 11:00 PM | 
			
    
	
		
		
		06-17-2021
	
		
		11:03 PM
	
	
	
	
	
	
	
	
	
	
	
	
	
	
		
	
				
		
			
					
				
		
	
		
					
							 Convert field to timestamp then compare.     [
    {
        "$addFields": {
            "timestamp": {
                "$toLong": "$header.timestamp"
            }
        }
    },
    {
        "$match": {
                "timestamp": {
                    "$gte": ${startTimestamp:toDate("yyyy-MM-dd HH:mm:ss"):toNumber()}
                },
                "timestamp": {
                    "$lte": ${endTimestamp:toDate("yyyy-MM-dd HH:mm:ss"):toNumber()}
                }
         }
    },
    {
        "$project": {
            "timestamp": 1
        }
    }
]    
						
					
					... View more
				
			
			
			
			
			
			
			
			
			
		
			
    
	
		
		
		06-17-2021
	
		
		11:00 PM
	
	
	
	
	
	
	
	
	
	
	
	
	
	
		
	
				
		
			
					
				
		
	
		
					
							 Im convert match field to timestamp then compare. Resolved  [
    {
        "$addFields": {
            "timestamp": {
                "$toLong": "$modified_at"
            }
        }
    },
    {
        "$match": {
                "timestamp": {
                    "$gte": ${stored.state:toDate("yyyy-MM-dd HH:mm:ss"):toNumber()}
                },
                "timestamp": {
                    "$gte": ${current.state:toDate("yyyy-MM-dd HH:mm:ss"):toNumber()}
                }
         }
    },
    {
        "$skip": ${offset}
    },
    {
        "$limit": ${limit}
    },
    {
        "$project": {
            "code": 1
        }
    }
]    
						
					
					... View more
				
			
			
			
			
			
			
			
			
			
		
			
    
	
		
		
		06-17-2021
	
		
		10:10 PM
	
	
	
	
	
	
	
	
	
	
	
	
	
	
		
	
				
		
			
					
				
		
	
		
					
							 I am trying to get all documents within a time range using RunMongoAggreation.  In console I tried with below query and it worked fine.  aggregate([  {  "$match": {  "modified_at": {  "$gte": ISODate("2017-02-08T12:10:40.787")  }  }  }  ])  Flowfile has below properties  startTimestamp: 2017-02-08T12:10:40.787  Below is the query being used in RunMongoAggreation  [  {  "$match": {  "modified_at": {  "$gte": "${startTimestamp}"  }  }  }  ]
  Its not return result 
						
					
					... View more
				
			
			
			
			
			
			
			
			
			
		
		
			
				
						
							Labels:
						
						
		
			
	
					
			
		
	
	
	
	
				
		
	
	
- Labels:
- 
						
							
		
			Apache NiFi
 
        


