1 to 2 of 2
I want to pass a value stored in a variable to a dateopen / datemodified filter but for some reason no data is returned.Here is part of my sample C# code:DateTime targetDate = DateTime.Now.AddDays(-3); HttpWebRequest request = WebRequest.Create("https://api.myintervals.com/task/?dateopen=targetDate") as HttpWebRequest;Please anyone assist.
I've noticed a few issues that might be impeding your progress.1. My C# is not very good, but I believe that if you want to use a variable within a string, you have to concatenate the string. Furthermore, since targetDate is an object of type DateTime, to use it in a string you may have to explicitly convert it to a string to be used as part of a URL. I belive your second line should be
HttpWebRequest request = WebRequest.Create("https://api.myintervals.com/task/?dateopen=" + targetDate.ToString()) as HttpWebRequest;
Intervals is web-based project management software developed by Pelago.