I am creating a new report using CreateQuery() in Double Click Bid Manager with Date Range as "Custom_Dates" but running out of exception as below -
**Google.Apis.Requests.RequestError
The request you submitted is invalid. [400]
Errors [
Message[The request you submitted is invalid.] Location[ - ] Reason[validationError] Domain[global]
]**
Below is the code which I was trying for Custom Date. I am having issue with
ReportDataStartTimeMs, ReportDataEndTimeMs values as they are expecting long datatype values, I have tried with .ticks for the date as well and in google search I could see .ticks will take as nanoseconds. tried with different datetime values.
DateTime dtStart = new DateTime(2019, 07, 11, 0, 0, 1, 1);
DateTime dtStart = Convert.ToDateTime("2019/07/11",
CultureInfo.InvariantCulture);
DateTime dtEnd = Convert.ToDateTime("2019/07/12",
DateTime dtStart = Convert.ToDateTime("2019/07/11");
DateTime dtEnd = Convert.ToDateTime("2019/07/12");
1) query.ReportDataStartTimeMs =
Convert.ToInt64((DateTime.Now.ToUniversalTime() -
dtStart).TotalMilliseconds + 0.5);
query.ReportDataEndTimeMs =
dtEnd).TotalMilliseconds + 0.5);
Convert.ToInt64(DateTime.UtcNow.Date.Subtract(new DateTime(2019,
07, 11)).TotalMilliseconds);
07, 12)).TotalMilliseconds);
query.ReportDataEndTimeMs = dtEnd.Ticks / 1000000;
I am expecting to create a new report on executing - Createquery(query).Execute(); method. Please help me on this issue