Skip to content


Current date in a CRM Query criteria

Jamie asked 4 years ago
Hi There,
I’m simply trying to narrow the results of a CRM Query as a Datasource to the current date.  i.e. Contact.[Created On] > GetDate().  Obviously it’s not using true SQL syntax as GetDate() doesn’t work.  I’ve tried .NET syntax as well with no luck.  I simply get the error “The Date-Time format for xxx is invalid….”.  There must be a trick I’m missing…
Ethan Sorenson Staff answered 4 years ago
We have a good blog post about this scenario. You can use scripting to pull the current date and assign it to a global variable. Then use the Global Variable in your source query.
Jamie replied 4 years ago

Awesome! That’s what I was looking for. Thank you

If you would like to submit an answer or comment, please sign in to the eOne portal.