Hi Everyone!
I’m trying to use a custom sharepoint activity to retrieve a specific list item using a CAML Query to filter a datetime column. However, the CAML only accepts the datetime value in the ISO 8601 format or “yyyy-MM-ddThh:mm:ssZ”. The problem arises whenever I try to convert my period variable (“11/25/2020”) into the format above since it’s returning “yyyy-MM-dd hh:mm:ss” or “2020-11-25 12:00:00”
Here’s the expression that I used:
Convert.ToDateTime(in_Period).ToString(“yyyy-MM-ddThh:mm:ssZ”)
I’m looking for the expression to return a result in this exact format “2020-11-25T12:00:00Z” .
Thank you in advance!
Regards,