CommitCRM Search for Accounts by Date

This first example uses a TimeSpan of 1 hour to determine the date one hour prior to the runtime of the code. The purpose is to identify the Accounts created during the last hour. 

Alternatively if it is preferred to use a fixed date, then on Line 47 change the value to be equal to a string. The syntax required of the date field in CommitCRM is in the comment on Line 47. 

The Powershell example below merely demonstrates searching for Accounts created since a fixed date. 

You could extend this example to programatically check the datetime at script execution time, subtract an hour, and then use the resultant date in the body of the XML below to find the accounts created in the previous hour