Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 252940

VCloudException: Bad request: Cannot parse 'XXX' as date

$
0
0

Hello,

Does anybody know how to pass date into filter parameter of QueryRecords function. Whatever date format I use, it keeps returning this error.

Here is the code snippet:

 

 

                QueryParams<QueryAdminEventField> eventQueryParam = new QueryParams<QueryAdminEventField>();
                string dtStr = "01/01/01 01:01:01";
                Expression exp = new Expression( QueryAdminEventField.TIMESTAMP, dtStr, ExpressionType.GREATER_THAN );
                eventQueryParam.Filter = new Filter( exp );
                RecordResult<QueryResultAdminEventRecordType> evn = ExtQueryService.QueryRecords<QueryAdminEventField, QueryResultAdminEventRecordType>(
                        QueryRecordType.ADMINEVENT, eventQueryParam );

 

The above code generates 'Bad request: Cannot parse '01/01/01 01:01:01' as date.' exception.


Viewing all articles
Browse latest Browse all 252940

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>